Run the full test suite:
Build portal:
>cd build >ant
Run the tests:
>cd testsuite >ant tests
This will automatically start the server and deploy any artifacts needed by portlet and server modules. Make sure you have JBOSS_HOME variable set in your environment! HTML JUnit reports are also generated in testsuite/output/reports
Running individual modules' tests
>cd testsuite >ant test-module -Dmodule=[modulename]
For example:
ant test -Dmodule=cms
Augment the test classpath to add jdbc drivers
The property driver.path can be used to augment the classpath of the tests with any jar. It accepts colon- or semicolon-separated lists of locations, by default the value contains the location of the hsqldb jar in thirdparty.
>ant tests -Ddriver.path=XYZ
Add additional databases
The files test/output/etc/datasources.xml and test/output/etc/hibernate.xml have to be modified to add a new datasource configuration and a new hibernate configuration. The datasource configuration will be defined by its name and the config properties and the hibernate configuration will be defined by the datasource name and the hibernate configuration properties. There is a special "default" hibernate configuration which contains properties that will be applied to all configurations and which are overridable. Usually at least one property must be set up, it is the dialect name.
OutOfMemoryError when generating build reports
Increase ant's heap :
export ANT_OPTS=-Xmx256m
-
Comments