Sending Selenium Test Results to TestRail using Travis CI

Learn how to integrate TravisCI with TestRail to efficiently manage and centralize your automated testing efforts. This tutorial guides you through running Selenium-based Java TestNG tests in TravisCI and uploading results to TestRail using the TestRail CLI.

Key Steps:

  1. Configure TravisCI:
    • Clone the sample project from GitHub and configure TravisCI using a .travis.yml file.
    • Select the Xenial Build Environment and define a two-phase job: the "script" phase for test execution and the "after_script" phase for result uploads.
  2. Run and Report Tests:
    • Use mvn clean compile test to execute tests and generate JUnit-style XML reports.
    • Install the TestRail CLI in the "after_script" phase and specify configuration options, including:
      • TestRail instance (-H)
      • Project name (-Y)
      • User credentials (-U, -P)
      • XML report path (-F).
  3. View Results in TestRail:
    • Test results, including failures and exceptions, are uploaded to TestRail within seconds.
    • View graphical summaries, detailed logs, and direct links to TravisCI for deeper analysis.

This integration provides a unified platform for automated and manual test management, enabling streamlined reporting and enhanced test coverage. For a step-by-step walkthrough, refer to the text guide available in TestRail’s documentation hub.

 

You are in good company. Many of the world’s best teams use TestRail.