Welcome to the jGuard's wiki » Welcome on your Wiki » Development Zone » Execute unit tests against your database

Execute unit tests against your database

Last modified by RaffaelloPelagalli on 2006/04/03 17:02

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.

Tags:
Created by diabolo512 on 2006/04/02 17:38

jGuard team copyright 2004-2009
3.1.1