Version 4

    1. How to debug the test harness

     

    The test harness deploys test applications on the target VI using the vendor porting layer and spawns test client VMs. You may want to debug the harness when you have troubles deploying.

     

    In order to debug the harness, modify $TS_HOME/bin/build.xml to include debugging switches for the <java> target corresponding to the task you want to debug ("runclient" or "gui")

     

      <target name="runclient" depends="init, prepare.work.report.dirs, check.selected.test, no.selected.test,
        check.java.options, no.java.options, translatepath">
        .....
        <java classname="com.sun.javatest.tool.Main" failonerror="yes" fork="yes">
          .....
          <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=harness"></jvmarg>
        </java>
      </target>
    

       

     

     

    The harness will suspend its execution waiting for the debugger to connect.

     

    2. How to debug the test client in a CTS environment configured for JBoss

     

    The JavaTest harness spawns a new VM for each test. In order to instrument the VM for debugging, specify (or uncomment) the jboss.test.debugging property definition in $TS_HOME/bin/ts.jte:

     

     

    jboss.test.debugging=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=client
    

     

    Be careful NOT to enclose the property value within quotation marks, the VM will treat it as a long unrecognizable debugging switch and your test will abort.

     

    Each new test client VM will wait for the debugger to connect to it.

     

    3. How to debug the target JBoss

     

    Add

    
    JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss $JAVA_OPTS"
    
    

    to $JBOSS_HOME/bin/run.sh.

     

     

    Referenced by: