Tests

Get a test

Get a test with its aggregated duration, reliability, and execution metrics over a specified time range. A test with no executions in the time range is still returned, with zeroed execution counts and no durations or reliability.

get/organizations/{org}/suites/{suite_slug}/tests/{id}

Request

  • Base URL: https://api.buildkite.com/v2/analytics
  • URL: https://api.buildkite.com/v2/analytics/organizations/{org}/suites/{suite_slug}/tests/{id}
  • Auth: HTTP bearer

Path parameters

orgstring required

Organization slug

suite_slugstring required

Suite slug.

idstring uuid required

Test UUID.

Query parameters

periodstring
Example:7days

Relative aggregation window, such as 7days or 28days. Whether selected by period or timestamps, the aggregation window cannot exceed the organization's maximum Test Engine window. Cannot be combined with min_timestamp or max_timestamp.

max_timestampstring date-time

End of the aggregation window in RFC 3339 format. Defaults to the current time when omitted. Cannot be combined with period.

min_timestampstring date-time

Start of the aggregation window in RFC 3339 format. When omitted, defaults to the organization's default Test Engine period before the current time. Cannot be combined with period.

Headers

Buildkite-Versionstring required
Example:2026-08-01

Opt in to the versioned Test Engine API response.

Response

The test with metrics.

idstring uuid
urlstring uri
web_urlstring uri
scopestring
namestring
locationstring
file_namestring
state'enabled' | 'muted' | 'skipped'

Test state.

state_changed_atstring date-time nullable

When the test entered its current state. Null for enabled tests, which are the default and carry no state record.

labelsstring[]
reliabilitynumber nullable

Ratio of passed executions to passed and failed executions. Null when there were no executions in the aggregation window.

duration_avgnumber nullable

Average execution duration in seconds. Null when there were no executions in the aggregation window.

duration_sumnumber nullable

Total execution duration in seconds. Null when there were no executions in the aggregation window.

duration_minnumber nullable

Shortest execution duration in seconds. Null when there were no executions in the aggregation window.

duration_maxnumber nullable

Longest execution duration in seconds. Null when there were no executions in the aggregation window.

executions_countinteger

Number of executions in the aggregation window.

Changes

No recorded changes to this operation across all 1 revision of this API.