Configuring Test Suites

In Test Analytics, a test Suite is a collection of tests. A run is to a suite what a build is to a Pipeline.

Many organizations set up one suite per test framework, for example one suite for RSpec, and another suite for Jest. Others use a common standard, such as JUnit XML, to combine tests from multiple frameworks to set up custom backend and frontend suites.

Each suite inside Test Analytics has a unique API token that you can use to route test information to the correct suite. Pipelines and test suites do not need to have a one-to-one relationship.

To delete a suite, or regenerate its API token, go to suite settings.

Parallelized builds

Test Analytics works even when your test runs are split across different agents by de-duplicating against the Test Analytics API token and unique build identifier.

The information that serves as a unique build identifier differs between CI environments. For details, see run_env[key] environment variables on our CI environments page.

Compare across branches

All test suites have a default branch so you can track trends and set monitors against your most important codebase, and compare it to results across all branches.

Organizations typically choose their main production branch as their default, although this is not required.

To change your default branch, go to suite settings. You can also filter Test Analytics views by any branch by typing its name into the branch query parameter in the Test Analytics URL.

Tracking reliability

Test Analytics calculates reliability of both your entire test suite and individual tests as a measure of flakiness over time.

Reliability is defined as percentage calculated by:

  • Test suite reliability = passed_runs / (passed_runs + failed_runs) * 100
  • Individual test reliability = passed_test_executions / (passed_test_executions + failed_test_executions) * 100

Other test execution results such as unknown and skipped are ignored in the test reliability calculation.

In Test Analytics, a run is marked as failed as soon as a test execution fails, regardless of whether it passes on a retry. This helps surface unreliable tests. You can have a situation where a build eventually passes on retry in a Pipeline, and the related run is marked as failed in Test Analytics.

Once your test suite is set up, you'll have many types of information automatically calculated and displayed to help you surface and investigate problems in your test suite.

For individual tests, views include trend information on reliability, test execution count, failed test execution count, and test execution duration at p50 and p95, along with detailed information about span duration and total duration of that test execution over time.

Screenshot of test trend page showing test trend information over the last 7 days, including failed test execution count and test execution durations
Screenshot of test trend page showing change in duration across test runs and a recent failed test executions

Select any individual test execution to see more trend and deep-dive information, including comparisons against previous executions of this test.

For example, in the following screenshot, you can see that the test execution duration of 5.26 seconds is 2 seconds and 233 milliseconds more than the median of the previous 25 executions. In addition, the current value for this test execution of 5.26 seconds is in the 66th percentile within the distribution over the last 25 executions.

Screenshot of individual test execution page showing test information related to that individual execution of the test

You can also annotate span information to help investigate problems, and see detailed log information inside Test Analytics for any failed test or run.

Screenshot of span timeline with user-defined annotation