Setting the Build Capability
Just set the
build desired capability to the value of the
JOB_NAME and BUILD_NUMBER environment variable. For example, in Java:
Marking Tests as Pass/Fail
The Sauce plugin for Jenkins will also mark the Sauce jobs as passed or failed, but you need to configure Jenkins to parse the test results.
- In Jenkins, on the project configuration page, go the Post-Build Actions section.
Select Run Sauce Labs Test Publisher.
Outputting the Jenkins Session ID to stdout
stderrthat have this format:
session id can be obtained from the
RemoteWebDriver instance and the
job-name can be any string, but is generally the name of the test class being executed.
To make sure that your test results and Sauce jobs are associated properly, you need to output the session id to
stdout. For example, this is the code you would use to output the session id to the Java stdout.