lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Speaking of tests
Date Fri, 15 Oct 2010 01:54:00 GMT

: In Junit4, there's a TestWatchman class that has a failed method that's
: called whenever a test fails. It *seems* like it would be possible to
: gather them all up and print them at the end, but I confess I have no
: clue how, and don't have time to look now.

interesting...

the intent of TestWatchmen seems to be so that individual test classes can 
configure certain things to happen when *any* of the tests fail (or have 
some interesting condition happen) ... we could put that in our JUnit base 
class ... but ...

It might be more reliable to modify our recently add 
LuceneJUnitResultFormatter to do tis aggregation as it collects failure 
info ... i'm not seeing any sort of "tear down" or "close" method though, 
so i'm not sure if it's really possible.

Hmmm...

I do note that in Ant 1.8.0 there is a "failure" formatter that looks kind 
of cool ... it's purpose is to generate a new TestCase that contains calls 
to all of the tests that failed, but the lifecyle concepts could be 
borrowed to generate the same kind of info in a summary report...

http://ant.apache.org/manual/Tasks/junit.html
http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java


-Hoss

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message