Skip to main content

flaky_tests

Creates, updates, deletes, gets or lists a flaky_tests resource.

Overview

Nameflaky_tests
TypeResource
Iddatadog.software_delivery.flaky_tests

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
search_flaky_testsinsertList endpoint returning flaky tests from Flaky Test Management. Results are paginated.<br /><br />The response includes comprehensive test information including:<br />- Test identification and metadata (module, suite, name)<br />- Flaky state and categorization<br />- First and last flake occurrences (timestamp, branch, commit SHA)<br />- Test execution statistics from the last 7 days (failure rate)<br />- Pipeline impact metrics (failed pipelines count, total lost time)<br />- Complete status change history (optional, ordered from most recent to oldest)<br /><br />Set include_history to true in the request to receive the status change history for each test.<br />History is disabled by default for better performance.<br /><br />Results support filtering by various facets including service, environment, repository, branch, and test state.
update_flaky_testsupdatedataUpdate the state of multiple flaky tests in Flaky Test Management.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.

INSERT examples

List endpoint returning flaky tests from Flaky Test Management. Results are paginated.<br /><br />The response includes comprehensive test information including:<br />- Test identification and metadata (module, suite, name)<br />- Flaky state and categorization<br />- First and last flake occurrences (timestamp, branch, commit SHA)<br />- Test execution statistics from the last 7 days (failure rate)<br />- Pipeline impact metrics (failed pipelines count, total lost time)<br />- Complete status change history (optional, ordered from most recent to oldest)<br /><br />Set include_history to true in the request to receive the status change history for each test.<br />History is disabled by default for better performance.<br /><br />Results support filtering by various facets including service, environment, repository, branch, and test state.

INSERT INTO datadog.software_delivery.flaky_tests (
data
)
SELECT
'{{ data }}'
RETURNING
data,
meta
;

UPDATE examples

Update the state of multiple flaky tests in Flaky Test Management.

UPDATE datadog.software_delivery.flaky_tests
SET
data = '{{ data }}'
WHERE
data = '{{ data }}' --required
RETURNING
data;