Report

Retrieve unified test quality metrics for a workspace

Changed on

Returns multiple quality dimensions for tests in a workspace over a specified time range. V1 includes flake rate and breakage rate. Flakiness is calculated by grouping test runs by execution context and identifying groups with mixed outcomes. Breakage rate measures how often a test transitions from passing to failing between consecutive runs.

The summary statistics reflect ALL matching tests in the workspace, while the tests array is paginated. Use the cursor parameter to fetch additional pages.

get/workspaces/{workspace_id}/reports/testQuality

Request

  • Base URL: https://api.mabl.com
  • URL: https://api.mabl.com/workspaces/{workspace_id}/reports/testQuality
  • Auth: one of:
    • HTTP basic
    • API key in header Authorization

Path parameters

workspace_idstring required

The workspace ID

Query parameters

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_idstring

Optional test ID (invariant ID) to filter by

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

Type of test

Optional test type to filter by

browserstring

Optional browser to filter by

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

Where the test lives

Optional execution source to filter by

plan_labelsstring[]

Plan labels to filter by

sort_by_stabilityboolean

Deprecated: use sort_by=stability_rate&sort_direction=ASC instead. When true and sort_by is not set, orders the tests array by stability (least stable first) instead of the default quality-score ordering. Summary statistics are unaffected.

min_plan_runsinteger

Minimum number of plan runs required for a test to be included (default 5)

limitinteger

Maximum number of tests to return (default 100)

cursorstring

Pagination cursor from a previous response

test_idsstring[]

Optional test IDs (invariant IDs) to filter by, at most 200. Restricts the report to these tests, for callers that already know which tests they need and would otherwise have to page through the whole workspace report to find them. Combines with test_id and every other filter as AND. Summary statistics describe only the matching tests, not the whole workspace.

mobile_platform'android' | 'ios'

The mobile platform associated with this object

Optional mobile platform to filter by

sort_by'quality_score' | 'stability_rate' | 'total_plan_runs' | 'consistent_pass_runs' | 'pass_rate' | 'reliability_rate' | 'last_run_time' | 'last_failed_run_time'

Column to sort queryTestQuality's tests array by

Column to sort the tests array by. When omitted, falls back to sort_by_stability if set to true, otherwise to quality_score ascending (worst first). Summary statistics are unaffected by sort order.

sort_direction'ASC' | 'DESC'

Direction of sort when ordering query results

Direction to sort by. Only used when sort_by is set; defaults to ASC when omitted. ASC is "worst first" for rate/score columns (quality_score, stability_rate, pass_rate, reliability_rate); callers sorting by total_plan_runs, consistent_pass_runs, last_run_time, or last_failed_run_time will usually want DESC explicitly.

Response

Unified test quality metrics for the specified time range

workspace_idstring

ID of the workspace

interval_startinteger

Starting time of the reporting window in epoch milliseconds

interval_endinteger

Ending time of the reporting window in epoch milliseconds

cursorstring

Cursor for fetching the next page of results. Null if no more results.

Changes

    • info

      added the new optional query request parameter sort_by

    • info

      added the new optional query request parameter sort_direction

    • info

      query request parameter sort_by_stability was deprecated

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the new optional query request parameter mobile_platform