Sauce Labs integration
Use Sauce Labs profiles in Katalon Studio to execute test cases, test suites, and test suite collections, and view test results on Sauce Labs.
- An active Katalon Studio license. To learn more about activating your license, you can refer to this document: Activate Katalon license.
- Download and install the Sauce Labs Integration plugin. You can download the plugin from the Katalon Store here: Sauce Labs Integration.
To activate the plugin, navigate to Account Settings in Katalon Studio and click Reload Plugin.
Configure Sauce Labs profiles for WebUI testing​
Create a default Sauce Labs custom profile from the plugin​
Go to Project > Settings > Plugins > Sauce Labs Integration. Enter your credentials and your desired Sauce Labs operating environments and systems, including:
| Information | Description |
|---|---|
| API Key | An API Key is the Access Key generated from the User Settings in Sauce Labs. You can refer to this Sauce Labs document for further details about retrieving the API key: User Settings. |
| Username | Your username displayed in Sauce Labs. You can retrieve the Sauce Labs username in the User Settings. |
| Browser's name | The execution browser you want to execute with. For example, Safari. |
| Platform | The operating system you want to execute with. For example, macOS 10.13 |
| Version | The browser version you want to execute with. For example, you want to run with Safari 11.1, input 11.1. |
| Job's Name | The test case name you want to present in Sauce Labs. By default, this is set to Default Job. |
| Data Center | The region of your Sauce Labs account. For example, us-west-1 or eu-central-1. This field is under Global configuration. The plugin uses this value to call the Sauce Labs API for your region. It also uses it to build the WebDriver URL when you click Generate Sauce Labs Custom Profile. By default, this is set to us-west-1. To find the region ID of your account, see this Sauce Labs document: Data Center Endpoints. Available since Sauce Labs Integration plugin v1.1.0. |
Click Generate Sauce Labs Custom Profile to finalize your profile.
To view the newly created custom profile, go to Projects > Settings > Desired Capabilities > Custom.
- The default custom profile is named
saucelabs_default. - You can only edit the default custom profile properties from the Sauce Labs Integration generator.
Update an existing project after upgrading to v1.1.0​
Sauce Labs Integration plugin v1.1.0 adds the Data Center setting. Existing projects use us-west-1 by default.
If your Sauce Labs account is in another region, do the following after you upgrade:
- Go to Project > Settings > Plugins > Sauce Labs Integration.
- In Data Center, enter the region ID of your account. For example,
eu-central-1. - Click Generate Sauce Labs Custom Profile again. This updates the WebDriver URL in your profile to use the correct region.
Create a Sauce Labs custom profile using custom desired capabilities​
You can also create a new Sauce Labs custom profile using custom desired capabilities. To do so:
- Go to Projects > Settings > Desired Capabilities > Custom.
- Click Add, then name the new custom profile with the following syntax:
saucelabs_<your-custom-profile-name>. Here, we name our profilesaucelabs_custom. - Click on More (...) under the Value column. In the Custom Execution Configuration Builder dialog, click Add, then choose Remote.
- Click on More (...) under the Preferences column. In the pop-up Driver Builder dialog, specify as follows:
- Remote server URL: specify the Driver Creation URL in Sauce Labs. To find the Driver Creation URL, open your Sauce Labs account, go to Account > User settings, then scroll to the Driver Creation section.
- Remote server type: choose Selenium.
- Specify your Sauce Labs
username,accessKey. - Add other properties for your execution environment. You can refer to the Sauce Labs platform configuration here: Platform configuration.
You can now use the newly created profile to execute tests.
Run tests with Sauce Labs profiles​
Execute a test case with Sauce Labs profiles​
To execute a test case with Sauce Labs profiles, do as follows:
- Open a test case.
- Click the dropdown list next to Run.
- Select Custom capabilities.
- Select your Sauce Labs profile.
Execute a test suite with Sauce Labs profiles​
To execute a test suite with Sauce Labs profiles, do as follows:
- Open a test suite.
- Add the test cases you want to execute into the test suite.
- Click the dropdown list next to Run.
- Select Custom capabilities.
- Select your Sauce Labs profile.
Execute a test suite collection with Sauce Labs profiles​
To execute a test suite collection with Sauce Labs profiles, do as follows:
- Open a test suite collection.
- Add the test suites you want to execute into the test suite collection.
- Double-click on the cell under the Run with column. A Select an environment dialog opens.
- Select your Sauce Labs profile.
- Click OK. Then click Execute.
View test execution results on Sauce Labs​
To view Katalon test execution results on Sauce Labs, on the Sauce Labs Dashboard, switch to the Automated > Test Results tab.
- The Data Center setting defaults to
us-west-1. If your Sauce Labs account is in another region, update the setting and generate the default profile again. - For a manually created profile, make sure its Remote server URL uses the data center of your Sauce Labs account.
Configure Sauce Labs for mobile and hybrid testing​
To enable mobile and hybrid application testing with Sauce Labs profiles, you need to manually add capabilities in Projects > Settings > Desired Capabilities > Custom.
Then add mobile and hybrid application testing capabilities in the Sauce Labs document here: Appium Testing with Real Devices.
Troubleshooting​
| Symptom | What to check |
|---|---|
| On the Sauce Labs Dashboard, your job status shows Completed instead of Passed or Failed. | Confirm Data Center in Project > Settings > Plugins > Sauce Labs Integration matches the region of your Sauce Labs account. If you change it, click Generate Sauce Labs Custom Profile again. Also check that the name of your execution profile starts with saucelabs_. |
| Results do not sync to Sauce Labs. | The plugin only syncs results for execution profiles whose names start with saucelabs_. Profiles generated by the plugin already follow this rule, for example, saucelabs_default. If you create a custom profile manually, name it with the saucelabs_ prefix, for example, saucelabs_firefox. |