1. How to run JBoss/RI tests
1.1 Start the JBoss/RI
cd $JBOSS_HOME/bin run.sh -c cts (or run.sh -c cts-messaging)
or
cd $J2EE_HOME/bin asadmin start-domain
The RI's log is $J2EE_HOME/domains/domain1/logs
1.2 Start the database
cd $J2EE_HOME/pointbase/tools/serveroption startserver
1.3 Run tests in command-line
Unset ANT_HOME
cd $TS_HOME/src/com/sun/ts/test/samples $TS_HOME/bin/tsant runclient
1.3.1 How to run a single test in a leaf directory
Go to your test directory. Be aware that test directories are rooted in src: %TS_HOME%\*src*\com\sun\ts\tests\jms\ee\all\queueutests.
cd <test-directory> tsant -Dtest=emptyMsgsQueueTest -Dtest.client=QueueTests.java runclient
This command runs a single test (emptyMsgsQueueTest) four times, for each of the four vehicles mentioned in $TS_HOME/src/vehicle.properties: emptyMsgsQueueTest_from_ejb, emptyMsgsQueueTest_from_appclient, emptyMsgsQueueTest_from_jsp and emptyMsgsQueueTest_from_servlet. If you want to run the test with only one vehicle, use:
tsant -Dtest=emptyMsgsQueueTest_from_appclient -Dtest.client=QueueTests.java runclient
1.3.2 Where are specified the test vehicles?
$TS_HOME/src/vehicle.properties - each directory contains a list of vehicles used to run the tests in the directory.
1.4 Run tests from the GUI
Unset ANT_HOME
cd $TS_HOME/src/com/sun/ts/test/samples $TS_HOME\bin\tsant gui
1.5 Stop the database
You can stop the pointbase server by entering the q command in the pointbase console window.
1.6 Stop the JBoss/RI
cd $J2EE_HOME/bin asadmin stop-domain
2. Troubleshooting
If your servlets do not deploy (you get a ClassNotFoundException), this may be due to a deployment path that exceeds 255 characters. Try installing your JBoss instance as close to the file system root as possible.
Windows/Cygwin: In case you get an error message that the test driver cant create a server socket: "java.io.IOException: Unable to open a ServerSocket for port 2000", try starting the test runner from the windows command line. It's not working from within cygwin.
-
Referenced by:
Comments