ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Artima SuiteRunner Task
Date Wed, 26 Mar 2003 16:55:17 GMT
On Wednesday, March 26, 2003, at 11:46  AM, Nathaniel Spurling wrote:
> Regarding suiterunner vs JUnit, I prefer the suiterunner API:
>       test methods can throw Exceptions, also assertion failures 
> generate Exceptions so you can put one catch(Exception) at the bottom 
> of your method and print out any useful info before throwing the 
> exception on, rather than separate ones for AssertionFailedError and 
> Exception which looks very messy. Alternatively you can leave out the 
> try/catch altogether  - saves typing if you just want the stacktrace 
> -- I Don't find the failures/exceptions distinction useful in JUnit.

I often simply have my JUnit testXXX throw Exception since that is 
unexpected and a test failure/error.  I don't quite get how SuiteRunner 
is different here.

>       don't have to call super(String) - me being lazy again

This went away with JUnit 3.8 - thankfully!  That was my biggest pet 
peeve of JUnit.

>       which tests run can be determined by a property file so if you 
> want to run just a few tests out of a suite you don't need to 
> recompile/comment out bits of code

<test> and <batchtest> in Ant support if/unless properties and I always 
have it set up to be able to run a single test upon demand.

>       can also put classpath info in the property file, which seems 
> better than adding it to your junit script or CLASSPATH

Not usually an issue when using Ant and <junit> with a reusable 

>       flexible reporting of results - which you already mentioned - 
> and which I haven't used...

more flexible than <junitreport>?


View raw message