You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: The number of days the test has been active at the time of the status change.
26807
+
example: 15
26808
+
format: int32
26809
+
maximum: 2147483647
26810
+
nullable: true
26811
+
type: integer
26812
+
days_without_flake:
26813
+
description: The number of days since the test last exhibited flakiness.
26814
+
example: 30
26815
+
format: int32
26816
+
maximum: 2147483647
26817
+
nullable: true
26818
+
type: integer
26819
+
failure_rate:
26820
+
description: The failure rate of the test at the time of the status change.
26821
+
example: 0.25
26822
+
format: double
26823
+
maximum: 1
26824
+
minimum: 0
26825
+
nullable: true
26826
+
type: number
26827
+
state:
26828
+
description: The previous state of the test.
26829
+
example: quarantined
26830
+
nullable: true
26831
+
type: string
26832
+
total_runs:
26833
+
description: The total number of test runs at the time of the status change.
26834
+
example: 200
26835
+
format: int32
26836
+
maximum: 2147483647
26837
+
nullable: true
26838
+
type: integer
26839
+
type: object
26840
+
FlakyTestHistoryPolicyMetaConfig:
26841
+
description: Configuration parameters of the policy that triggered this status change.
26842
+
properties:
26843
+
branches:
26844
+
description: The branches considered by the policy.
26845
+
example: ["main"]
26846
+
items:
26847
+
type: string
26848
+
nullable: true
26849
+
type: array
26850
+
days_active:
26851
+
description: The number of days a test must have been active for the policy to trigger.
26852
+
example: 30
26853
+
format: int32
26854
+
maximum: 2147483647
26855
+
nullable: true
26856
+
type: integer
26857
+
failure_rate:
26858
+
description: The failure rate threshold for the policy to trigger.
26859
+
example: 0.7
26860
+
format: double
26861
+
maximum: 1
26862
+
minimum: 0
26863
+
nullable: true
26864
+
type: number
26865
+
forget_branches:
26866
+
description: Branches excluded from the policy evaluation.
26867
+
example: ["release"]
26868
+
items:
26869
+
type: string
26870
+
nullable: true
26871
+
type: array
26872
+
required_runs:
26873
+
description: The minimum number of test runs required for the policy to trigger.
26874
+
example: 100
26875
+
format: int32
26876
+
maximum: 2147483647
26877
+
nullable: true
26878
+
type: integer
26879
+
state:
26880
+
description: The target state the policy transitions the test from.
26881
+
example: quarantined
26882
+
nullable: true
26883
+
type: string
26884
+
test_services:
26885
+
description: Test services excluded from the policy evaluation.
26886
+
example: ["my-service"]
26887
+
items:
26888
+
type: string
26889
+
nullable: true
26890
+
type: array
26891
+
type: object
26753
26892
FlakyTestPipelineStats:
26754
26893
description: CI pipeline related statistics for the flaky test. This information is only available if test runs are associated with CI pipeline events from CI Visibility.
26755
26894
properties:
@@ -26829,6 +26968,14 @@ components:
26829
26968
FlakyTestsSearchFilter:
26830
26969
description: Search filter settings.
26831
26970
properties:
26971
+
include_history:
26972
+
default: false
26973
+
description: |-
26974
+
Whether to include the status change history for each flaky test in the response.
26975
+
When set to true, each test will include a `history` array with chronological status changes.
And body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "include_history": true, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
136
+
And body with value {"data": {"attributes": {"filter": {"include_history": true, "query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
137
137
When the request is sent
138
138
Then the response status is 200 OK
139
139
@@ -149,19 +149,21 @@ Feature: Test Optimization
149
149
Scenario: Search flaky tests returns "OK" response with history
150
150
Given operation "SearchFlakyTests" enabled
151
151
And new "SearchFlakyTests" request
152
-
And body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"limit": 10}, "sort": "fqn", "include_history": true}, "type": "search_flaky_tests_request"}}
152
+
And body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\"", "include_history": true}, "page": {"limit": 10}, "sort": "fqn"}, "type": "search_flaky_tests_request"}}
153
153
When the request is sent
154
154
Then the response status is 200 OK
155
155
And the response "data[0].attributes" has field "history"
156
156
And the response "data[0].attributes.history[0]" has field "status"
157
157
And the response "data[0].attributes.history[0]" has field "commit_sha"
158
158
And the response "data[0].attributes.history[0]" has field "timestamp"
159
+
And the response "data[0].attributes.history[0]" has field "policy_id"
160
+
And the response "data[0].attributes.history[0]" has field "policy_meta"
0 commit comments