db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "DerbyJUnitTesting" by KristianWaagan
Date Wed, 29 Mar 2006 09:13:08 GMT
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 KristianWaagan:

  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.
+ == Base JUnit test classes ==
+ After some duscussion on derby-dev, a set of base classes to be used when writing JUnit
tests were created.
+ These are:
+  * `BaseTestCase`
+  * `BaseJDBCTestCase`
+  * `TestConfiguration` 
+  * `JDBCClient`
+ To write a JUnit test that uses JDBC, make your test class extend `BaseJDBCTestCase`. Then
you can add test methods, write your `setUp` and `tearDown` methods and finally the `suite`
method that returns a suite of tests to run (typically all tests in the test class). `BaseJDBCTestCase`
provides a set of often used functionality, for instance the method `getConnection` to obtain
a connection to the default database. If you are missing something, ask on derby-dev or create
a sub-task/link a Jira isse to DERBY-1122.
+ `BaseTestCase` is to be used for JUnit tests not using the JDBC API.
+ `TestConfiguration` holds information about the test configuration/environment. It is responsible
for parsing information passed along from the test harness.
+ `JDBCClient` is an enumeration of valid JDBC clients the test harness can be run with.
+ Remember that the methods `setUp` and `tearDown` are run before and after each test method
in your class. If you want to run some code only once before or after all test methods in
your class, you can consider using a `TestSetup` test decorator.
+ Information about JUnit can be found at http://www.junit.org
+ The usage of JUnit in Derby is currently based on JUnit 3.8.1.
  == Requested features for the JUnit harness ==
  Features requested for the JUnit harness on derby-dev. Note that this page is intended to
be a summary page only. In general, all information presented here should be found in the
mail archives for derby-dev as well (you can search here: http://www.nabble.com/Derby-f356.html).

View raw message