ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ylan Segal" <y...@digiworks.tv>
Subject [OT] RE: "select" isn't broken
Date Tue, 29 Jan 2002 17:59:27 GMT
Just wanted to share my 2 cents.

I recently started using junit. The first time I took a look at the
framework, I really thought that it was not going to be of any use to me. So
I read an article that describes how one would use it in a real like
situation.

Of course, now I am a total convert and preacher. It is not like I am an
expert or anything, but I really like the framework and have gotten used to
writing test for my objects. I find that it makes it easier to catch bugs
early and have a better idea of where they are coming from.

For example, before we used junit, we would code some objects that accessed
the database, and then use those objects in servlets / jsp. Now, when we got
unexpected results stored or read from the db, it was a slow process to
debug. First, one would have to look at the html portion an make sure that
form elements had the proper spelling in their names, then move on to the
form handling jsp or servlet and make sure that everything was working
there, and if the problem still persisted, go back to the objects, just to
find out that a PreparedStatement was setting the wrong variable or
something of the sort. It was really a pain.

Now, since objects are tested before starting the jsp pages, we can be sure
that they are storing and retrieving the correct values from the database
and if a problem arises during jsp development, then we can be sure that the
problem lies there, not on some code that was written 3 weeks before.
Debugging takes place when the code is written!!.

Of course, there is also a problem of buggy tests!. If the test you write
are not testing for what they should, then the problem may become even
worse!!!.

Anyway, I hope this made some sense. If it didn't just ignore the ramblings
of this coffee-deprived programmer.

Ylan Segal.



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message