Running Unit TestsPage edited by Andrus AdamchikCayenne 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. PrerequisitesOn some systems (e.g. Ubuntu 8.x) the following line needs to be placed in "~/.mavenrc" or otherwise there will be test failures in the unit tests relying on JGroups. This is a workaround of a known JVM bug: MAVEN_OPTS="-Djava.net.preferIPv4Stack=true"
Another way to store this information permanently for each profile is to create a directory $HOME/.cayenne/ and place a file called connection.properties in this directory. File contents should be similar to this example: mysql.cayenne.adapter = org.apache.cayenne.dba.mysql.MySQLAdapter mysql.jdbc.username = someuser mysql.jdbc.password = somepasswd mysql.jdbc.url = "" mysql.jdbc.driver = com.xyz.MyDriverClass oracle.cayenne.adapter = org.apache.cayenne.dba.oracle.OracleAdapter oracle.jdbc.username = someuser oracle.jdbc.password = somepasswd oracle.jdbc.url = "" oracle.jdbc.driver = com.xyz.MyDriverClass Each property starts with the Maven profile name ("mysql" and "oracle" in the example above). Note that in this case you should still use cayenneTestConnection. E.g.: $ mvn test -DcayenneTestConnection=derby Look at test resultsTo look for failed tests, grep the output files. $ grep FAIL framework/cayenne-jdk1.5-unpublished/target/surefire-reports/*.txt
Change Notification Preferences
View Online
|
View Change
|
- [CONF] Apache Cayenne Website > Running Unit Tests confluence
- [CONF] Apache Cayenne Website > Running Unit Tests confluence
- [CONF] Apache Cayenne Website > Running Unit Tests confluence
