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 DanDebrunner
Date Thu, 20 Jul 2006 16:41:22 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 DanDebrunner:

   * `org.apache.derbyTesting.functionTests.util.TestConfiguration` 
   * `org.apache.derbyTesting.functionTests.util.JDBCClient`
- Note that the class `DerbyJUnitTest` in the same package is [http://www.mail-archive.com/derby-dev@db.apache.org/msg23272.html
+ <!> Note that the class `DerbyJUnitTest` in the same package is [http://www.mail-archive.com/derby-dev@db.apache.org/msg23272.html
  To write a JUnit test that uses JDBC, make your test class extend `BaseJDBCTestCase`. This
class is subclass of [http://www.junit.org/junit/javadoc/3.8.1/junit/framework/TestCase.html
TestCase] in JUnit framework and 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 issue to DERBY-1122.
@@ -41, +41 @@

  Please do not reference the internal Derby class that define SQL states. This class is not
part of Derby's public interface, and should thus not be used to check for expected SQL states.
+ == Running tests using Junit directly ==
+ Tests can be run using the Junit 3.8 TestRunners. The classpath needs to include the junit.jar
and the Derby classes.
+ /!\ Since running a test like this is outside of the Derby test harness, setup the test
expects may not be provided and thus the
+ test may change its behaviour in unpredictable ways.
+ === batch run ===
+ {{{
+ > java -cp '../../tools/java/junit.jar;../../classes' junit.textui.TestRunner
+         org.apache.derbyTesting.functionTests.tests.jdbcapi.ProcedureTest
+ ...........................
+ Time: 8.943
+ OK (27 tests)
+ >
+ }}}
+ === GUI (awt) run ===
+ {{{
+ > java -cp '../../tools/java/junit.jar;../../classes' junit.awtui.TestRunner
+ }}}
+ The supply the complete name of the test class in the top window, e.g. `org.apache.derbyTesting.functionTests.tests.jdbcapi.ProcedureTest`.
  == 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