Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 15374 invoked from network); 1 Nov 2006 18:40:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Nov 2006 18:40:18 -0000 Received: (qmail 65431 invoked by uid 500); 1 Nov 2006 18:40:29 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 65414 invoked by uid 500); 1 Nov 2006 18:40:29 -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 65403 invoked by uid 99); 1 Nov 2006 18:40:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Nov 2006 10:40:29 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Nov 2006 10:40:18 -0800 Received: from ajax.apache.org (localhost [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 11BF9D495B for ; Wed, 1 Nov 2006 18:39:57 +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: Wed, 01 Nov 2006 18:39:56 -0000 Message-ID: <20061101183956.29942.75669@ajax.apache.org> Subject: [Db-derby Wiki] Update of "KillDerbyTestHarness" 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/KillDerbyTestHarness ------------------------------------------------------------------------------ || How to run tests with Derby's client driver? || Any test class's suite() method should return a suite that runs fixtures in embedded and client/server mode as required. !TestConfiguration.defaultSuite() takes a Class object and returns a suite that runs all the test methods starting with `test` in both embedded and client server. When more control is needed over wich tests are run in emebdded and client/server !TestConfiguration provides these methods: clientServerDecorator, clientServerSuite & embeddedSuite. In addition the !NetworkServerTestSetup decorator can be used directly. || || Since the database is re-used when running tests how do I ensure the test starts out with a clean database? || Use the !CleanDatabaseTestSetup decorator. || || How to execute DDL at setUp that is dropped automatically at tearDown? || Provide a class that extends !CleanDatabaseTestSetup and implement the decorateSQL method. This can be achieved as an inner class, search for references to !CleanDatabaseTestSetup for examples. || + || How to run a test in SQL authorization mode? || Use the utility method !TestConfiguration.sqlAuthorizationDecorator. The simple !DatabasePropertyTestSetup cannot be used directly since setting the SQL authorization mode cannot be undone. The returned decorator changes the default database to a different one that has SQL authorization mode set. This database, like the default database, is re-used by each call to !TestConfiguration.sqlAuthorizationDecorator. || == Harness features ==