The Sauce Labs Cookbook

Sauce Headless

Front End Performance Testing

Insights

External Resources

More Info


Page tree
Skip to end of metadata
Go to start of metadata

TestObject End-of-Life Coming September 1, 2021

Action Required: If you're currently using the Appium test framework on TestObject, please migrate all of your mobile apps and test files from TestObject Storage to Sauce Labs Application Storage by August 31, 2021 using the step-by-step guide on this page. Appium real device testing is fully supported on Sauce Labs.

As part of our efforts to bring you a single, unified platform combining all of our products – with RDC, emusim, API, visual testing, and analytics all in one place with one login – we're migrating all real device cloud functionality from TestObject (Legacy RDC) to Sauce Labs. See Real Device Testing in Sauce Labs Feature Preview.

TestObject will remain accessible under SAUCE APPS > LEGACY RDC through August 31, 2021. As we begin phasing it out, we'll keep you posted on key end-of-life dates. If you have any questions, please reach out to your Customer Success Manager or Sauce Labs Support.

What You'll Need

  • Your TestObject credentials (username and API key).
  • You Sauce Labs credentials (username and access key).
  • Know your preferred Sauce Labs Data Center (e.g., US-West-1, EU-Central-1).

If you don't have a mobile app or test file on hand and would like to practice the below functionality, check out our Sauce Labs sample app.

Application Upload and Versioning

The Sauce Labs platform provides options for uploading files (applications, binaries, pre-run executable scripts, etc.). To learn more about how to upload your application for testing, please visit Application Storage.

Sauce Labs User Management

When migrating from TestObject to Sauce Labs, you MUST confirm that your entitlements and platform privileges have carried over from TestObject to Sauce Labs. To view and modify user access and privileges on the Sauce Labs side, log into Sauce Labs and go to Account > Team Management

Sauce Labs uses Extended Team Management to assign users to teams, bestow user privileges, and manage device/VM concurrency.

Modifying Real Device Test Builds

In order to utilize and reach the new unified platform, you'll need to modify your existing test builds. Below are the necessary steps in order to achieve success on the Sauce Labs platform.

Step 1: Gather Your Sauce Labs Credentials

You will need to replace your TestObject account credentials (TestObject username and API key) with your Sauce Labs credentials (Sauce Labs username and access key).

To grab your Sauce Labs credentials (username and access key), go to Account > User Settings. For more information, see Best Practice: Use Environment Variables for Authentication Credentials.

Step 2: Change Remote URL from TestObject Endpoint to Sauce Labs Endpoint

You will need to replace your Remote URL endpoint from TestObject platform to the Sauce Labs platform, for example:

Also, if you're using Sauce Connect Proxy, the REST API, or any other features, consult the Data Center Endpoints documentation for further information.

Step 3: Change Device Test Options

Not all device model and operating system combinations will carry over from the TestObject platform to Sauce Labs. You may need to adjust your device capabilities in your test configuration.

  • Device Allocations: To ensure your preferred device allocations will still work when you move from TestObject to Sauce Labs, view the list of available devices for your region by logging into the Sauce Labs platform and going to Live > Cross-Browser > Mobile Real. For a full, non-region specific list of supported devices and platforms, see Supported Browsers and Devices.
    • ENTERPRISE USERS ONLY: if you switch your Sauce Labs Data Center in the UI, you may see a different set of devices. Each Data Center stores a different set of mobile real devices.
  • Appium Capabilities: We recommend validating that the Appium capabilities you've used on TestObject will still work when you move tests to Sauce Labs; see Appium Capabilities for Real Device Testing.

Step 4: Upload your Application to Sauce Application Storage

All mobile apps you've stored in TestObject storage will no longer be accessible after TestObject reaches end-of-life. Please upload these to Sauce Application Storage.

  • For instructions on uploading your mobile apps (.apk or .ipa files) to Sauce Labs, see Application Storage and Uploading and Accessing Real Device Apps.
  • You'll also need to change the way you reference your app in your test code capabilities. For example, in the app capability, you must use storage:<app-id>, or storage:filename=<some-app.apk>, rather than sauce-storage:<myapp.apk>. For more information on this step, see Application Storage > Using Application Storage with Automated Test Builds.

Microsoft App Center Integration 

The App Center Integration feature of the Legacy Real Device Platform will reach end-of-life after the migration. To use this feature in Sauce Labs, you'll need to create a post-build script in Microsoft App Center; for instructions, see Creating an App Center Post-Build Script for Sauce Labs.

Step 5: Switch from TestObject REST API Endpoint to Sauce Labs REST API Endpoint

When TestObject reaches end-of-life in Fall 2021, support for TestObject REST API endpoints will change or end.

As you switch from testing on TestObject to Sauce Labs – especially if your organization uses the TestObject REST API for helper classes or reporting purposes –  please note that the REST API endpoints for Sauce Labs are different.

The chart below contains Sauce Labs-equivalent endpoints to use in place of the TestObject endpoints. Additional resources for context:

TestObject (Legacy RDC) Endpoints

Sauce Labs RDC EndpointsExplanation / Relevant Wiki Pages

Base API

https://app.testobject.com/api/rest/https://api.us-west-1.saucelabs.com/US Data Center REST API
https://app.testobject.com/api/rest/https://api.eu-central-1.saucelabs.com/EU Data Center REST API

Storage API

storage/uploadv1/storage/$SAUCE_USERNAME/$FILE_NAMERDC on Sauce Labs will now use methods mentioned in Application Storage.

Appium Watcher API

v2/appium/session/{sessionId}/skiptestN/ANo Longer Supported / Deprecated
v2/appium/session/{sessionId}/testN/ANo Longer Supported / Deprecated

Appium Suites API

v2/appium/suites/{batchId}

v1/analytics/trends/builds_tests

Appium suites will no longer be supported. Sauce Labs recommends using the Sauce Insights Methods, specifically Build And Test Statistics.
v2/appium/suites/{batchId}/deviceIdsN/ANo Longer Supported / Deprecated
v1/appium/suites/{batchId}/reports/startN/ANo Longer Supported / Deprecated
v2/appium/suites/{batchId}/reports/{batchReportId}/finishN/ANo Longer Supported / Deprecated
v2/appium/suites/{batchId}/reports/{batchReportId}/results/{testReportId}/finishN/ANo Longer Supported / Deprecated
v2/appium/suites/{batchId}/reports/{batchReportId}/results/{testReportId}/skipN/ANo Longer Supported / Deprecated

Devices API

v2/devicesv1/rdc/devicesThe Get Devices functionality will remain the same with one caveat, when calling this endpoint you must specify the data center. Refer to the table at the top of this section and Data Center Endpoints for more information.
v2/devices/availablev1/rdc/devices/availableThe Get IDs of Available Devices functionality will remain the same with one caveat, when calling this endpoint you must specify the data center. Refer to the table at the top of this section and Data Center Endpoints for more information.
v2/devices/{deviceDescriptorId}v1/rdc/devices/$DEVICE_IDThe Get Device functionality will remain the same with one caveat, when calling this endpoint you must specify the data center. Refer to the table at the top of this section and Data Center Endpoints for more information.

Test Reports API

v2/reports/{testReportId}v1/rdc/jobs/$JOB_IDSupport for testReportId will now use the Get Job.

Logs API

  • v2/logs/{testReportId}/appium
  • v2/logs/{testReportId}/device
  • v2/logs/{testReportId}/vitals
  • v2/logs/{testReportId}/xcuitest
rest/v1/$SAUCE_RDC_USERNAME/jobs/$JOB_ID/assets/$FILE_NAMESupport for downloading test asset files (logs, videos, screenshots etc.) requires using Get Job Asset Files. Also, downloading specific files requires you to know the names of said files. See Get Job Asset Names for more context.
v2/logs/{testReportId}rest/v1/$SAUCE_RDC_USERNAME/jobs/$JOB_ID/assetsThe Get Job Asset Names method returns the names of assets associated with a given test/job in JSON format.

Session Report API

v1/devices/reportsv1/rdc/jobsFor general information about test runs in RDC on Sauce Labs, use the Get Jobs method, along with specific query parameters, in order to narrow the response data.

Screenshot API

v2/screenshots/{testReportId}/{screenshotId}.pngrest/v1/$SAUCE_RDC_USERNAME/jobs/$JOB_ID/assets/$FILE_NAMESupport for downloading test asset files (logs, videos, screenshots, etc.) requires using Get Job Asset Files. Also, downloading specific screenshots require you to know the names of said screenshot. See Get Job Asset Names for more context.

Suite Reports API

v2/batchReports/{batchReportId}N/ANo Longer Supported / Deprecated
v2/batchReports/{batchReportId}/xmlN/ANo Longer Supported / Deprecated

Session Video API

v2/video/{videoId}.mp4rest/v1/$SAUCE_RDC_USERNAME/jobs/$JOB_ID/assets/$FILE_NAMESupport for downloading test asset files (e.g., logs, videos, screenshots) requires using Get Job Asset Files. Also, downloading a specific video requires you to know the name of said video. See Get Job Asset Names for more context.
  • No labels