Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Creating a Session ID

...

JUnit 4.x

JUnit 5.x

Code Block
languagexml
<junit fork="yes">
  <jvmarg value="-javaagent:${sealights.dir}/sl-test-listener.jar"/>
  <jvmarg value="-Dsl.tokenFile=${sealights.dir}/sltoken.txt"/>
  <jvmarg value="-Dsl.buildSessionIdFile=buildSessionId.txt"/>
  <jvmarg value="-Dsl.testStage=Unit Tests"/>
</junit>
Code Block
languagexml
<junitlauncher>
            <testclasses outputdir="build/test-report">
                 <fork>
                    <jvmarg value="-javaagent:${sealights.dir}/sl-test-listener.jar"/>
                    <jvmarg value="-Dsl.tokenFile=${sealights.dir}/sltoken.txt"/>
                    <jvmarg value="-Dsl.buildSessionIdFile=buildSessionId.txt"/>
                    <jvmarg value="-Dsl.testStage=Unit Tests"/>
                </fork>
            ...
</junitlauncher>
Info

See 'Java Command Reference - Installing test listener as Java Agent' for full parameter details

Sample integration into an existing ANT project

...