Execute unit tests against your database

To execute unit tests against your database, you need to update the database related properties file (i.e mysql.properties for example) which contains settings like jdbc driver, jdbc url and so on...

This 'properties' file is located under the 'test' directory in the net.sf.jguard.database package. You must also to provide a system property called 'database' setting its the value 'mysql' (if you don't do that, all tests will be run against the hsqldb database). You can do that in eclipse with: window>preferences>java>installed JREs and 'edit' the jre which is selected, and in 'default VM arguments' set it to '-Ddatabase=mysql'

With these settings, unit tests which involve database will be run against the mysql database.

To see supported databases, you can have a look at DatabaseTestCase.

Version 1.4 last modified by Alex Jacobs on 03/04/2006 at 17:02

Comments 0

No comments for this document

Attachments 0

No attachments for this document
 

Creator: Charles Gay on 2006/04/02 17:38
jGuard team copyright 2004-2007
1.1.1