Daniel John Debrunner wrote:
What's the benefit of running unit tests against jar files? For functional tests I see the benefit, it is testing the user api using artifacts the user is expected to have on the classpath. However for unit tests I can't see what bugs would be found by testing against classes that are in a "fake" jar (assuming the unit tests are run against classes as well).
Actually, I can not see a really big difference on running unit tests and function tests. The errors discovered by unit test may not appear during a run of functional tests since the functional tests do not cover each and every situation it may happen during an execution. However this errors might show up to a user after some time or in a special case/deploy.
So I see b) and c) as being the same really, manufacturing some fake jar (and for b it's more than derby.jar, may want to unit test network code for example) for no benefit. As an alternative I think the unit testing could easily be setup as a optional step in the build process. There could be an additional target in top level build.xml file that ran the unit tests against the classes and those that wanted could include it in their build process (e.g. a target all_with_unit_tests).
Yes, this might be a sufficient solution.

Julo

Reply via email to