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.
26726
+
example: 15
26727
+
format: int32
26728
+
maximum: 2147483647
26729
+
nullable: true
26730
+
type: integer
26731
+
days_without_flake:
26732
+
description: The number of days since the test last exhibited flakiness.
26733
+
example: 30
26734
+
format: int32
26735
+
maximum: 2147483647
26736
+
nullable: true
26737
+
type: integer
26738
+
failure_rate:
26739
+
description: The failure rate of the test at the time of the status change.
26740
+
example: 0.25
26741
+
format: double
26742
+
maximum: 1
26743
+
minimum: 0
26744
+
nullable: true
26745
+
type: number
26746
+
state:
26747
+
description: The previous state of the test.
26748
+
example: quarantined
26749
+
nullable: true
26750
+
type: string
26751
+
total_runs:
26752
+
description: The total number of test runs at the time of the status change.
26753
+
example: 200
26754
+
format: int32
26755
+
maximum: 2147483647
26756
+
nullable: true
26757
+
type: integer
26758
+
type: object
26759
+
FlakyTestHistoryPolicyMetaConfig:
26760
+
description: Configuration parameters of the policy that triggered this status change.
26761
+
properties:
26762
+
branches:
26763
+
description: The branches considered by the policy.
26764
+
example: ["main"]
26765
+
items:
26766
+
type: string
26767
+
nullable: true
26768
+
type: array
26769
+
days_active:
26770
+
description: The number of days a test must have been active for the policy to trigger.
26771
+
example: 30
26772
+
format: int32
26773
+
maximum: 2147483647
26774
+
nullable: true
26775
+
type: integer
26776
+
failure_rate:
26777
+
description: The failure rate threshold for the policy to trigger.
26778
+
example: 0.7
26779
+
format: double
26780
+
maximum: 1
26781
+
minimum: 0
26782
+
nullable: true
26783
+
type: number
26784
+
forget_branches:
26785
+
description: Branches excluded from the policy evaluation.
26786
+
example: ["release"]
26787
+
items:
26788
+
type: string
26789
+
nullable: true
26790
+
type: array
26791
+
required_runs:
26792
+
description: The minimum number of test runs required for the policy to trigger.
26793
+
example: 100
26794
+
format: int32
26795
+
maximum: 2147483647
26796
+
nullable: true
26797
+
type: integer
26798
+
state:
26799
+
description: The target state the policy transitions the test from.
26800
+
example: quarantined
26801
+
nullable: true
26802
+
type: string
26803
+
test_services:
26804
+
description: Test services excluded from the policy evaluation.
26805
+
example: ["my-service"]
26806
+
items:
26807
+
type: string
26808
+
nullable: true
26809
+
type: array
26810
+
type: object
26672
26811
FlakyTestPipelineStats:
26673
26812
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.
26674
26813
properties:
@@ -26748,6 +26887,14 @@ components:
26748
26887
FlakyTestsSearchFilter:
26749
26888
description: Search filter settings.
26750
26889
properties:
26890
+
include_history:
26891
+
default: false
26892
+
description: |-
26893
+
Whether to include the status change history for each flaky test in the response.
26894
+
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