Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 46586 invoked from network); 12 Jan 2007 17:50:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jan 2007 17:50:39 -0000 Received: (qmail 77005 invoked by uid 500); 12 Jan 2007 17:50:46 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 76982 invoked by uid 500); 12 Jan 2007 17:50:46 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 76971 invoked by uid 99); 12 Jan 2007 17:50:46 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jan 2007 09:50:46 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jan 2007 09:50:39 -0800 Received: from eos.apache.osuosl.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 25E8B59F71 for ; Fri, 12 Jan 2007 17:50:19 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: derby-commits@db.apache.org Date: Fri, 12 Jan 2007 17:50:18 -0000 Message-ID: <20070112175018.28370.28399@eos.apache.osuosl.org> Subject: [Db-derby Wiki] Update of "DerbyJUnitTesting" by DanDebrunner X-Virus-Checked: Checked by ClamAV on apache.org 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: http://wiki.apache.org/db-derby/DerbyJUnitTesting ------------------------------------------------------------------------------ }}} Then supply the complete name of the test class in the top window, e.g. `org.apache.derbyTesting.functionTests.tests.jdbcapi.ProcedureTest`. The use of the `-noloading` flag is required, if you recompile Derby or the test classes you must restart the graphical test runners. + + === Running tests using ant in a code line === + The top-level build.xml file in the trunk codeline contains two targets for running JUnit tests. + + || '''Target''' || '''Action''' || + || `junit-all` || Run all the JUnit tests. Runs the same set of tests as `suites.All` though it is broken down into per-package `_Suite` runs. May also run additional tests that require special setup or need to run in their own JVM such as the tests for checking the auto-loading of JDBC drivers || + || `junitreport` || Run `junit-all` and produce an HTML report in the output folder || + + The tests are run using the CLASSPATH of the environment which needs to include the Derby code you want to test and junit.jar. + `JAVA_HOME` needs to be set to the JVM to be tested and `PATH` must be set up so that the execution of `java` matches the virtual + machine from `JAVA_HOME`. + + If the ant property `jdk16` is set then the Java SE 6/JDBC 4 tests will be run using the virtual machine at `${jdk16}/bin/java`. + Note this need not match the virtual machine defined in `JAVA_HOME`. If `jdk16` is not set then the Java SE 6/JDBC 4 tests '''even''' + if `JAVA_HOME` points to a Java SE 6 environment. + + The output folder is created in the curent directory with the name `junitYYYYMMDD_hhss`, e.g. `junit_20070112_0813`. + When the report is generated it can viewed using the `index.html` file in the output folder. + === Running tests using the old Derby harness === The [:KillDerbyTestHarness:old Derby harness] supports running JUnit tests directly and from its suite.runall files.