4. Test with SauceLabs

Now you will change the Run UI Tests task in the Acceptance phase to run a Sauce Labs test. Sauce Labs lets you run your UI tests against multiple platforms, cross browsers, and on different devices and resolutions.

If you do not have a Sauce Labs account, you can create a trial to see how it works.

To integrate with Sauce Labs, you need Protractor tests written in the Jasmine framework and in JavaScript or TypeScript to run
against Sauce Labs. In Sample Release we have a simple test to explain how it works.

Create an Endpoint for Sauce Labs

Follow these steps:

  • Go to Administration, Endpoints, and click Add Endpoint.
  • Type a Name for the endpoint.
    Example: SauceLabs_Endpoint
  • In the Select Plugin field, choose Protractor Endpoint.
  • Enter your Sauce Labs user name and API key (to get the API Key, go to your Sauce Labs account. In Sauce Labs, the API key is
    called Access Key).
  • In the Git Project URL field, enter the URL repository you created by cloning the sample applications.Note: Git credentials are needed only if the cloned repository is private.

Configure the SauceLabs Task

Follow these steps:

  • Open the Run UI Tests task to edit.
  • In the Task Type field, select Run Protractor Test.
  • In the Endpoint field, select the endpoint you created.
  • In the Test Folder field, write tests.
  • In the Specs Mask field, type spec.ts.
  • In the Branch field, type master.
  • In the GitHub cloned repository open the the test.config.ts file to edit and change the base URL to your application URL (after you deploy on AWS CodeDeploy).