The Tesults web app is designed for desktop browsers. Sign up and configure your project on a laptop or desktop. Use the iOS app or Android app to view results on the go.

Test reporting and continuous integration and deployment

Make deployment decisions and report test failures in your continuous deployment pipelines with Tesults

blog-title-image

When triggering tests in a continuous integration and deployment (CI/CD) pipeline there may be times you want to make a deployment decision based on test results. You may also want to share build and test failures with your team. This post explains how to do this with Tesults.

The assumption for this post is that you have already signed up, created a project and integrated your tests to report results with Tesults. If you have not please take look at getting started. You should also have your continuous integration system set up to trigger your tests at the appropriate time in your build pipeline.

To make a deployment decision based on test results, or to share build and test failures, your continuous integration system needs to be able to access the relevant test results for the current build. This is done using the Tesults API.

To make it easier to retrieve results data it is recommended you pass in a build name and build result as part of your Tesults integration. This build name should also be available to your continuous integration pipeline. Instructions on how to pass in build information to Tesults are dependent on the test framework integration or language library you are using, please review the documentation for your language or test framework. It is possible to retrieve results without using a build name but this is less straight forward because it requires checking the timestamp for the test run to determine which results you are interested in.

Create a Tesults API token

Go to the configuration menu and select API Token from the menu.

create-api-token-1

Click the Create API Token button to create an API token.

create-api-token-2

Copy the token for use with API requests.

Retrieve results data

Utilize the /api/results endpoint (reference documentation) to retrieve results data after your test run step in the continuous integration pipeline has completed. To do this make a GET request to https://www.tesults.com/api/results. Pass your API token as an authorization header and specify the target id for which to fetch results.

A curl request to fetch data looks like this:

curl https://www.tesults.com/api/results
?target=target_id&build=build_name;
-H "Authorization: Bearer token"

Replace token with the API token
Replace target_id with a target ID
Replace build_name with a build name

The request above assumes you are using a build name (any string value) to retrieve results. If you are not using a build name, omit the build parameter to instead fetch the latest results data for the target. You can utilize the limit parameter to fetch more than one set of results. Please view the Results API documentation for a full list of parameters. View Targets API documentation to learn how to retrieve target IDs.

A successful response will retrieve results data:

{
    "data": {
        "code": 200,
        "message": "Success",
        "results":{
            "runs": [
                {
                    "created_time": 1631398688540,
                    "pass": 149,
                    "total": 150,
                    "build_name": "1.0.0",
                    "build_result": "pass",
                    "build_raw_result": "passed",
                    "cases": [
                        {
                            "name": "Sign in successfully",
                            "desc": "Signs in to site",
                            "suite": "Authentication",
                            "result": "pass",
                            "duration": 11122000,
                            "num": 0,
                            "hash": "7c95f9b7-578d92c19fdd",
                            "_CustomField": "Custom value",
                            "params": {
                                "terrain": "land",
                                "climate": "warm",
                                "temperature": "25C"
                             },
                            "files": [
                                "screenshot1.png", "test.log"
                            ],
                            "files_base_path": "/files/base/path"
                        },
                        {... more test cases}
                    ]
                ]
            },
           "cursor": cursor_value
       }
}

Parse the JSON and retrieve the run object. Use the pass and total fields to determine if all test cases passed and if you want more detailed information on specific failures retrieve the cases array from the response object.

What you ultimately base a deployment decision on is up to you and your team. This may be as simple as ensuring all tests have passed (pass == total) or you may have additional checks such as ensuring that the total number of test cases is larger than zero. Whatever the criteria you use you now have the data you need to make an informed deployment decision and provide success and failure feedback.

Please contact help@tesults.com if you have questions or require assistance.

- Tesults Team

Test automation reporting and failure intelligence

Consolidated test reporting for engineering teams. Store, track, and understand test results across every run and system.

Latest Posts

How AI Coding Agents Use Test Results to Verify Their Own Work
How AI Coding Agents Use Test Results to Verify Their Own Work
Why a raw pass or fail is not enough for an agent to trust its own change, and how failure intelligence closes the self-verification loop
Store and View Pytest Results Over Time
Store and View Pytest Results Over Time
Why pytest results vanish after each CI run, and how to keep a durable history you can view, compare, and track over time
How to Group and Categorize Failing Tests by Root Cause
How to Group and Categorize Failing Tests by Root Cause
When a CI run shows dozens of failures, label each one with a root cause category and group them to see how many distinct problems you actually have
How to View JUnit XML Test Results in a Dashboard
How to View JUnit XML Test Results in a Dashboard
Upload JUnit XML to a dashboard in one step, and why a test framework library gives you richer reporting with logs, screenshots, and full history
How to Keep a History of Test Results Instead of Losing Them After Each CI Run
How to Keep a History of Test Results Instead of Losing Them After Each CI Run
Why CI logs and artifacts disappear, what you lose when they do, and how to retain a durable history of every test run
How to Query Test Results With AI Agents Using MCP
How to Query Test Results With AI Agents Using MCP
How to query your CI test data failures, flaky tests and regressions with AI agents using the Model Context Protocol
ROS 2 Test Reporting with Tesults
ROS 2 Test Reporting with Tesults
Native support for the full ROS 2 testing stack — C++, Python, Rust, and beyond
Cypress Test Reporting - Beyond the Built-in Reporters
Cypress Test Reporting - Beyond the Built-in Reporters
What Cypress's built-in reporters give you and where they fall short
Playwright Test Reporting: Beyond the Built-in Reporters
Playwright Test Reporting: Beyond the Built-in Reporters
What Playwright's built-in reporters give you and where they fall short
How AI is Transforming Software Testing and Automation
How AI is Transforming Software Testing and Automation
AI is impacting software testing and automation in a big way. Here’s how AI is reshaping the testing landscape.
What is Automated Regression Testing and How to Do It
What is Automated Regression Testing and How to Do It
Learn about what automated regression testing is, how to do it, benefits, why it matters, tooling, reporting and best practices
Guide to API Automation Testing
Guide to API Automation Testing
What is api automation testing, how to do it, best practices and how to report and analyze test results