Back to Resources


Posted June 13, 2023

Sauce Labs and TestRail Integration: Optimize Test Automation with Improved Observability and Risk Management

The Sauce Labs and TestRail integration unifies test management and end-to-end traceability. Learn more in this solution brief.

Automated testing can help development and QA/testing teams work faster and more efficiently, which can lead to to upstream gains by way of higher-quality products, reduced costs, and increased revenue.

Yet despite the benefits of test automation, many engineering and product teams struggle to implement it efficiently and effectively. One of the leading challenges is setting aside the time and effort needed up front to develop automated tests, followed closely by managing and maintaining those tests.

To address these challenges, teams often add to their tech stacks without considering how to integrate new tools with existing testing processes. This can lead to data silos, inefficient team collaboration, and a lack of meaningful traceability between development and QA.

The Solution: The Sauce Labs and TestRail Integration

To increase test volume and speed without sacrificing product quality, you need to track your test automation efforts in the same place as the rest of your testing. One way to accomplish this is to integrate a continuous test automation platform like Sauce Labs with a centralized test management platform like TestRail.

The Sauce Labs and TestRail integration unifies test management and end-to-end traceability to help teams better understand where to focus and prioritize their test automation efforts so they can maximize the impact of automated testing.

TestRail’s Quality OS centralizes manual and automated test management and gives you visibility into your entire quality operation. With TestRail, you can consolidate and report on all your testing activities, no matter which tools or frameworks you use or how you execute your testing.

Sauce Labs allows you to run various types of test automation frameworks — like Selenium, Appium, Cypress, Playwright, and more — on multiple devices. They provide continuous testing and error reporting solutions that streamline the creation, delivery, and enhancement of high-quality code. 

About the Sauce Labs-TestRail Integration

The Sauce Labs-TestRail integration provides a powerful toolset for streamlining your testing process, enabling faster and more efficient test automation, and improving your overall QA and testing process visibility.

To integrate Sauce Labs with TestRail, you simply need to run your automated tests using the saucectl CLI tool and then TestRail’s trcli.  Saucectl runs automated tests across multiple browsers, operating systems, and devices, and then the trcli uploads your test automation results to TestRail.

Saucectl acts as a command line interface to orchestrate the relationship between your tests in your framework and the rich parallelization, test history filtering, and analytics of Sauce Labs. It also enhances JUnit reports with information related to your testing sessions.

TestRail CLI is a command line interface tool that helps you import results from automated tests and even create test cases automatically. The TestRail CLI tool reads JUnit reports and sends the relevant data to TestRail so you can have all your test results in one place.

Benefits of the Sauce Labs-TestRail Integration

Once the test results from Sauce Labs are within TestRail, the data is consolidated into a unified platform for testing, providing several benefits for QA and development teams:

  1. Single source of truth: use TestRail as a centralized location for managing all your tests, runs, and results. By reporting on test automation results alongside manual test results in TestRail, you get a unified repository and history for all of your testing efforts.

  2. Enhanced visibility and reporting: visualize all of your test data in real-time to discover areas of risk. By integrating Sauce Labs with TestRail, your entire QA team can access the most up-to-date testing information no matter who (or what) ran the tests and use TestRail’s built-in reports to isolate problems and optimize your quality processes. 

  3. End-to-end traceability: TestRail allows you to report on traceability between development requirements, automated tests run in Sauce Labs, and defects using TestRail’s references and defect fields. This enables you to leverage the power of continuous testing in Sauce Labs while maintaining compliance for audits and security requirements.

  4. Improved collaboration: build transparency and visibility into QA by tracking all your test activities and quality metrics in a single source of truth to improve team collaboration. Regardless of whether they are manual or automated tests, all test results are easily accessible in TestRail, allowing teams to identify and address issues quickly.

  5. Streamlined testing: by using Sauce Labs to run your automated tests and integrating Sauce Labs with TestRail, you can speed up the process of building, maintaining, and reporting on automated tests. Save time and effort by focusing on what matters: improving software quality.

  6. Test orchestration: take full advantage of your Sauce Labs integration with TestRail by using Sauce Orchestrate for both web and mobile test orchestration. Bring any test suite—any framework, any language—and accelerate test runs by up to 70%. Save additional time and costs by offloading compute workloads (such as mock APIs and ephemeral microservices) from your CI/CD platform of choice. Sauce Labs offers the original, purpose-built test infrastructure with greater cost-efficiency, scalability and intelligent capabilities to accelerate deployment and get your product to market faster.

How the Sauce Labs-TestRail Integration Works

Integrating Sauce Labs and TestRail is simple. First, install saucectl and configure it to start running automated tests in Sauce Labs by following the instructions on the Sauce Labs saucectl documentation. Then, install the TestRail CLI and connect it to your TestRail instance. When you complete these steps, the only thing left to do is to push the automated test results to TestRail using the JUnit report generated by Sauce Labs.

Once you have mapped your test results to your test cases in TestRail, you can view all your test results in one platform. The test results will include test status, test artifacts, and browser and platform information. Use the hyperlink provided in the test result to jump back to Sauce Labs and find more information about the test execution itself. 

  • Execution of your automated tests in Sauce Labs using the framework of your choice

  • Organization and visualization of all your manual and automated testing activities in TestRail

  • Hyperlink on the TestRail result to easily navigate back to Sauce Labs

  • Custom reports built from a single source to track the coverage of your tests, references, defects, and much more


The Sauce Labs integration with TestRail offers several advantages for software development teams, including faster development, increased efficiency, and improved test visibility. By using command line interfaces to send automated test results from JUnit reports generated by Sauce Labs to TestRail, teams can easily manage tests, track progress, and store results in a single source of truth without losing track of execution details.

Additionally, the integration helps teams ensure the quality of their user experience by ensuring web and mobile applications function and perform as intended on every browser, OS, and device. The integration is straightforward, and with the help of tools such as the saucectl and the TestRail CLI, teams can enhance their testing process and reduce the risk of bugs going unnoticed.

Jun 13, 2023
Share this post
Copy Share Link

Ready to to integrate test management into your test automation strategy?

Reach out to your Customer Success Manager or contact us to learn more

© 2023 Sauce Labs Inc., all rights reserved. SAUCE and SAUCE LABS are registered trademarks owned by Sauce Labs Inc. in the United States, EU, and may be registered in other jurisdictions.