This document describes the functionality provided by the xlr-saucelabs-plugin. This plugin provides the ability to retrieve and display job results from a Sauce Labs server.
See the XL Release Reference Manual for background information on XL Release and release concepts.
- Requirements
- XL Release 7.5.0+
- Sauce Labs Account with REST API v1.1
- Copy the latest JAR file from the releases page into the
XL_RELEASE_SERVER/plugins/__local__
directory. - Restart the XL Release server.
Begin by configuring one or more Sauce Lab servers. Navigate to Settings -> Shared configuration and add a Sauce Labs: Server.
Enter a descriptive name for this server.
Enter the full URL to the Sauce Labs server from which job results can be retrieved. Include protocol (http or https) and port number if applicable. For example: http://saucelabs.com
Choose the Basic Method from the drop down list. You may need to click the entry area to activate the drop down.
Enter the account username.
Enter the account ACCESS KEY in the password entry field
Optional proxy information if you access the SauceLabs server through a proxy.
In your SDLC templates, you can add a task of type SauceLabs -> Get Jobs as shown below. When this task executes, information about Sauce Labs jobs that meet the search criteria, will be retrieved.
The Sauce Labs server from which job information will be retrieved.
This optional entry can be used to override the Server username.
This optional entry can be used to override the Server access key/password.
Optional search criteria filter. If your Sauce Labs jobs have been annotated with Build IDs, you can filter results based on that value.
Optional search criteria filter. If your Sauce Labs jobs have been annotated with Test Names, you can filter results based on that value.
Optional search criteria filter. If this box is checked, the Test Name field entry will be used as a wildcard to filter results.
Optional search criteria filter. Limit the search to jobs started within a specific number of hours in the past. The default of zero will return all available test regardless of when they were started.
Optional search criteria filter. Limit the number of jobs returned to the specified number, starting with the most recent. The default of zero will return all available jobs.
The Sauce Labs plugin generates output that you may find useful in later tasks. First define the variable for the template. The Jobs output is a map<string,string> and JSON output is a string.
A map of key, value pairs. The key is the Job ID and the value is either Passed or Failed, if test have been annotated with these values.
Filtered Output from the Sauce Labs server, in JSON format. This can be helpful if you want to parse the output and carry out specific tasks based on that information.
Once the task is complete, you will see output like that shown below...
Log output displays the retrived job meta data, including a link to the Sauce Labs server job page, in table format.
Build and package the plugin with...
./gradle assemble
Run end to end integration tests - sets up test docker xlr and mock Saucelabs server to run tests. When tests complete, docker containers are stopped and removed.
./gradlew clean integrationTesting
Set up docker containers for Demo or Dev - Templates and mock Saucelabs server will be pre-loaded. Access XLR at http://localhost:15516 (username=admin, pw=admin).
./gradlew clean runDockerCompose
To clean up Demo or Dev Docker containers, run
./gradlew stopDockerCompose