Page Edited :
CAYSITE :
Running Unit Tests
Running Unit Tests has been edited by Tore Halset (Oct 15, 2007). Change summary: h4 -> h2 for looking at test results Cayenne provides a comprehensive suite of unit tests. To execute unit tests you must first get Cayenne from SVN, install JDK 1.5 and obtain the latest Maven. Running Against Embedded HSQLDBNo extra setup is required. Just run Maven: $ cd cayenne $ mvn install or
Step 2. Install JDBC Driver Jars in a Local Maven RepoMost commercial drivers are not present in the public Maven repositories. So they have to be installed by the tester locally. The group and artifact ids are arbitrarily assigned in the main Cayenne POM, so users must follow the POM or the examples below. FrontBase: $ mvn install:install-file -Dfile=frontbasejdbc.jar -DgroupId=com.frontbase \ -DartifactId=frontbase-driver -Dversion=4.1 -Dpackaging=jar -DgeneratePom=true OpenBase: $ mvn install:install-file -Dfile=OpenBaseJDBC.jar -DgroupId=com.openbase \ -DartifactId=openbase-driver -Dversion=9 -Dpackaging=jar -DgeneratePom=true Oracle: $ mvn install:install-file -Dfile=ojdbc14.jar -DgroupId=com.oracle \ -DartifactId=oracle-driver -Dversion=10 -Dpackaging=jar -DgeneratePom=true SQLite: $ mvn install:install-file -Dfile=sqlitejdbc-v037-nested.jar -DgroupId=org.sqlite \ -DartifactId=sqlite-driver -Dversion=0.37 -Dpackaging=jar -DgeneratePom=true SQLServer 2005: $ mvn install:install-file -Dfile=sqljdbc.jar -DgroupId=com.microsoft \ -DartifactId=sqlserver-driver -Dversion=2005 -Dpackaging=jar -DgeneratePom=true Sybase: $ mvn install:install-file -Dfile=jconn3.jar -DgroupId=com.sybase \ -DartifactId=sybase-driver -Dversion=12 -Dpackaging=jar -DgeneratePom=true Step 3. Run Tests Against Configured Data SourceTo activate a corresponding Maven profile, use "-Dcayenne.test.connection=name" property. E.g. to test against MySQL: $ mvn test -Dcayenne.test.connection=mysql Note that profiles are activated when run from either root of Cayenne Maven structure or from individual module directories. Look at test resultsTo look for failed tests, grep the output files. $ grep FAIL framework/cayenne-jdk1.4-unpublished/target/surefire-reports/*.txt |
Unsubscribe or edit your notifications preferences