[Webtest] unit test reporting
Paul King
webtest@lists.canoo.com
Mon, 03 Jan 2005 19:39:16 +1000
I have added unit test reporting to the site. While these aren't always
interesting if they have all passed, it does give an indication of which
areas of the code are well covered by unit tests and which ones executed
slowly.
To do this I broke the link between all of the AllTests classes. That
is, they no longer include the AllTests of lower subdirectories. All of
the AllTests classes are just picked up by ant in a filespec to the
batchtest element. I had to do this to get junitreport to split out the
different packages.
I think this is a reasonable compromise between just getting ant to
include all *Test classes (which would include unit tests in areas of
the code being worked on and possibly broken) and the fully linked up
approach. Let me know if this is going to cause lots of pain and I can
convert back.
An added bonus is that you can now call ant to perform a single test.
> ant unitTest
(will run all of the unit tests)
> ant unitTest
-DtestClass=com.canoo.webtest.extension.applet.runner.AllTests
(will run all applet runner related tests)
> ant unitTest
-DtestClass=com.canoo.webtest.steps.store.StorePropertyStepTest
(will run just the StorePropertyStepTest test)
Cheers, Paul.