ACCELQ supports Sauce Labs as cloud-infra provider for automation test execution. This article explains ACCELQ Agent configuration for connecting to your Sauce Labs subscription for browser and mobile devices required during test execution.
When running tests on ACCELQ, if the Agent is configured to point to Sauce Labs, your application browser (or mobile device) is invoked remotely on the cloud infrastructure, but the overall test execution and the results workflow remain with the ACCELQ Agent.
If you haven't already installed ACCELQ Agent, follow this article.
Information required from Sauce Labs
To integrate with Sauce Labs, you need the Access Key from your subscription with Sauce Labs. Login to your Sauce Labs account and click on the key icon in the top-nav bar; as shown in the screenshot below:
Configure ACCELQ Agent Properties (Agent Command Center)
If you are using the Agent Command Center portal, follow these steps. Command line instructions are provided in this next section.
Open ACCELQ Agent Command Center. In the target Agent (when running multiple Agents on the same machine), click on "Edit Configuration".
As shown in the screenshot below, select the checkbox for "Use external device provider for Web" and/or "Use external device provider for Mobile" depending on your need. Populate the Sauce Labs authentication information and save/restart the agent.
Configure ACCELQ Agent Properties (Command Line)
If you are using Command Line to set Agent properties, you should configure the following properties in your Agent properties file.
Properties for Browser-based executions:
- web_provider_password [Access Key read from your Sauce Labs subscription]
- web_provider_hostname [Optional]
- web_provider_port [Optional]
Properties for mobile device executions:
- mobile_provider_password [Access Key read from your Sauce Labs subscription]
- mobile_provider_hostname [Optional]
- mobile_provider_port [Optional]
Use the following command to set Agent properties. The "--agent" flag is optional in case only one agent is present in the system.
$ acc properties --agent <name> --set <property_name>=<value>
Executing a test
When the agent is ready and configured with Sauce Labs integration, you will be able to select the browser or Mobile OS/Device from the list supported by Sauce Labs.
In the Run modal, select the agent from the AGENT/HOST section and then select the browser and device from the respective sections.
Capturing a Mobile View
For Mobile Automation, you could use a device hosted on Sauce Labs for recording Views and for setting up element identification. Follow the steps here:
- In the View capture dialog, select Cloud Provider
- In the Provider dropdown, select Sauce Labs and provide the Access key and click Authenticate
- On successful authentication, Sauce Labs devices will be available for selection.
- Once all the fields are ready, click Start Capture and the capture session with the selected device will begin.