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 "KillDerbyTestHarness" by DanDebrunner
Date Wed, 01 Nov 2006 18:39:56 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:
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 ==

Mime
View raw message