Skip to content

CTS Batch Test with WildFly

chengfang edited this page Oct 1, 2013 · 18 revisions

How to debug cts batch tests in WildFly

  1. The general guide for running tck7 (cts7) with WildFly: https://community.jboss.org/wiki/TCK7Guide

  2. start WildFly in debug mode on port (e.g., 8787, the default one in standalone.conf):

cd $JBOSS_HOME/bin
./standalone.sh --debug 8787
  1. attach debugger to address 8787 in IDE

  2. set breakpoints in cts test classes. CTS batch tests are vehicle tests, which means test code is packaged, deployed and executed in appserver. So breakpoints in test code will show up in WildFly debug sessions.

4.1 ejb vehicle 4.2 web vehicle 4.2.1 servlet vehicle 4.2.1 jsp vehicle

  1. run individual test that you want to debug, e.g.,:
cd /Users/cfang/dev/jboss-tck/tck7/trunk/src/com/ibm/jbatch/tck/tests/jslxml
ant runclient -Dtest=testInvokeJobWithOnePartitionedStepExitStatus_from_web -Dtest.client=ParallExecutionTests.java

-Dtest.client sysprop tells cts harness in which test class to find the test method. The default value is Client.java. Since this test directory uses non-default test class names, so you need to specify -Dtest.client sysprop.

  1. to undeploy any test apps that may be left deployed on WildFly server after terminating the test run with Ctrl-C:
(in current test directory)
ant undeploy