Versions Compared

Key

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

...

When working with a supported framework, for example JUnit or TestNG, you can add the Sealights test listener as a javaagent which will capture the test information automatically.

Code Block
languagebash
javaexport SEALIGHTS_OPTS="-javaagent:/path/to/sl-test-listener.jar -Dsl.tags=testNG -tokenfile -Dsl.tokenFile=/path/to/sltoken.txt -Dsl.labid <Lab ID> -Dsl.testStage \"Functional Tests\" "
java $SEALIGHTS_OPTS -cp <CLASSPATH> org.testng.TestNG -testclass com.my.test
Expand
titleUsing Build Session ID
Code Block
languagebash
java -javaagent:/path/to/sl-test-listener.jar -Dsl.tags=testNG -tokenfile -Dsl.tokenFile=/path/to/sltoken.txt -Dsl.buildSessionIdFile=buildSessionId.txt -Dsl.labid <Lab ID> -Dsl.testStage "Functional Tests" -cp <CLASSPATH> org.testng.TestNG -testclass com.my.test
Info

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

...