You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by Apache Wiki <wi...@apache.org> on 2006/07/05 10:09:42 UTC

[Db-derby Wiki] Update of "DerbyJUnitTesting" by JohnHEmbretsen

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by JohnHEmbretsen:
http://wiki.apache.org/db-derby/DerbyJUnitTesting

------------------------------------------------------------------------------
  This page will describe how to run Derby JUnit tests, and how to write new JUnit tests for Derby. All features of the test harness related to JUnit testing should be described here as well.
+ 
+ == The junit test type ==
+ The name of a Derby test is the argument supplied to `org.apache.derbyTesting.functionTests.harness.RunTest` when the test is run. Derby JUnit test names always end with `.junit`, e.g. `somesuite/SomeTest.junit`. In other words, the test type is `junit`. The file that implements a test is a java file, e.g. `SomeTest.java`. The test harness uses the last part of the ''name'' to decide how it should run the test. If the name ends with `.java`, the harness knows that the test is a java class with a `main()` method. If the name ends with `.junit`, the harness knows it is a java class which can be run by a JUnit test runner.
  
  == Base JUnit test classes ==
  After some discussion on derby-dev, a set of base classes to be used when writing JUnit tests were created.