>         Great!  I am looking forward to seeing your implementation.   You 
> should
>pass this by the Lucene-dev list too.

I have checked in a basic skeleton for a JUnit test suite.  Here's how it 
works:

Test cases live in the hierarchy test/unit/com/lucene/... and are named 
TestXxxx.java.  They extend the standard JUnit test case.

To run all the unit tests, say
   ant test-unit
This will compile the test cases to the ant.build/unit-classes directory, 
and run JUnit on all of them.  You will get a summary report, and full 
JUnit reports will be written to ant.built/unit-reports.  (You will need 
the "optional" ant classes on your class path to run this.)

I checked in an example test, TestQueryParser, in 
test/unit/com/lucene/queryParser.  It is a very basic example of a JUnit 
test case.

The JUnit task works by looking for files matching Test*.java in the 
test/unit tree; you don't have to register new test cases, just add 
them.  Similarly, JUnit uses reflection to find methods named test*, so you 
can just add new test cases to existing tests too, without having to update 
a directory anywhere.

If anyone has feedback/comments/problems, let me know.


--
Brian Goetz
Quiotix Corporation
[EMAIL PROTECTED]           Tel: 650-843-1300            Fax: 650-324-8032

http://www.quiotix.com


_______________________________________________
Lucene-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/lucene-dev

Reply via email to