Report

Retrieve flaky and total test counts for a workspace, broken down by test type

Returns workspace-wide test counts and flaky-test counts, both overall and broken down by test type, over a specified time range. A test is flaky when its flake_rate is 0.10 or higher (equivalently, stability_rate is 0.90 or lower) -- the same definition and threshold as testQuality's tests_above_flakiness_threshold summary field.

Unlike testQuality, this endpoint returns only aggregate counts, not per-test rows -- use it when a caller needs workspace-wide totals without paginating through every test.

POST + a request body (rather than query params, like the rest of this file's query* endpoints) because plan_labels is an unbounded array -- as a CSV query param it can grow the URL past what a client, proxy, or load balancer will send.

post/workspaces/{workspace_id}/reports/flakyTestCounts

Path parameters

workspace_idstring required

The workspace ID

Request body

start_timeinteger required

Start of the query time range in epoch milliseconds

end_timeinteger required

End of the query time range in epoch milliseconds

application_idstring

Optional application ID to filter by

plan_idstring

Optional plan ID to filter by

environment_idstring

Optional environment ID to filter by

test_type'api' | 'browser' | 'performance' | 'mobile'

Type of test

browser'chrome' | 'edge' | 'firefox' | 'internet_explorer' | 'safari' | 'webkit'

The browser used to execute a test

execution_source'mabl_cloud' | 'external' | 'mabl_local' | 'mabl_agent'

Where the test lives

plan_labelsstring[]

Plan labels to filter by (tests must belong to plans with these labels)

min_plan_runsinteger

Minimum number of plan runs required for a test to be included

Response

Flaky and total test counts for the specified time range

totalinteger

Total number of tests matching the filters

flakyinteger

Number of tests with flake_rate >= 0.10 (stability_rate <= 0.90) -- same definition as testQuality's tests_above_flakiness_threshold summary field

Changes