Skip to main content

Integrating third-party testing products into Gearset

How to send and display data from third-party testing products to Gearset

E
Written by Einar Pius
Updated over 2 weeks ago

Gearset provides a public External Testing API as part of the Automation API for receiving test data from any third-party testing product. For the testing data to be displayed in Gearset, an integration must be created for transforming the data from the third-party product and sending it to Gearset via the API. The data from the External Testing API is shown as End to end test runs.

End to end testing data in Gearset

The End to end test runs of the latest CI job run can be accessed from the Pipelines or CI Jobs pages.

The End to end tests status column in CI jobs:

The End to end tests status label on an environment in Pipelines:

The End to end tests in the Testing section of a Pull Request in a Pipeline:

In Gearset, the End to end test runs are stored against the CI job runs.

Each CI job run can contain the details for any number of End to end test runs. The status label shown in the Pipelines and CI Jobs sections is an aggregate over all the End to end test runs with data in Gearset. Clicking on the status label opens the individual End to end test run details.

The End to end test results page lists all the test data available for a CI job run:

Gating - blocking deployments with End to End test runs

When a pull request is deployed and that deployment has an unsuccessful End to end test run associated with it, we block selecting the pull request for promotion.

It's still possible to promote the pull request by clicking "Dismiss and continue" and entering an optional dismissal reason. The End to end test run that has been dismissed is considered as successful when promoting pull requests.

Dismissing a result is done per End to end test run. This means that if the End to end test run was blocking multiple pull requests from promotion, all of them are now unblocked.

E.g. pull requests #27 and #17 in the above screenshots.

What testing data can be sent to Gearset

The following data can be sent to and displayed in Gearset via the External Testing API:

  1. Provider Name - A mandatory free text field for identifying the testing provider in the UI.

  2. Provider Run ID - An optional free text external ID to allow identifying a test run in the third-party product.

  3. Results URL - An optional URL to the test results page in the third-party product. If provided, a button to open the link will be in the End to end test results table.

  4. Status Class - A mandatory Gearset status classification used to determine how the status is displayed in the Pipelines and CI Jobs sections. All End to end test runs must be mapped to one of the following values:

    • Succeeded - all tests have finished and passed (or not run).

    • Failed - some critical tests have failed (or not run).

    • Warning - some tests have failed, but these are not critical.

    • In Progress - the test run is in progress.

    • Scheduled - the test run is scheduled for execution, but has not yet started.

    • Not Run - there is a test run that should be run, but it's not scheduled yet.

  5. It's the caller's choice of how to map the test run results, but we recommend sticking to the interpretation mentioned above.

  6. Status - The optional (short) status value of the test run as it is shown in the third-party product. This is the status displayed in the End to end test results. If missing, the Status Class is shown instead.

  7. Status Message - An optional (longer) informative message about the current status of the test run, if available from the third-party product (e.g., if there is an error, the error message). If provided, there will be a tooltip with the message when you hover over Status in the End to end test results.

  8. Start Time - The start time of the test run.

  9. End Time - The end time of the test run.

Getting Started With the External Testing API

  1. In the CI job, set up an outgoing webhook to send the CI job run ID on completion of a deployment to your third party provider.

    1. Your provider must be able to store this ID to then call our Public API with the test results.

  2. Generate a Gearset API access token for the Automation API to access our External Testing Public API.

  3. From the third party test provider, set up a webhook to call the External Testing Public API endpoints.

    1. You'll need the access token for authentication and CI job run ID in the endpoint path (see our External Testing Public API documentation)

How to find the CI Run ID

Open the CI job history

Select the View details of a CI Job Run

The CI Run ID is part of the URL

Did this answer your question?