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.
26535
+
example: 15
26536
+
format: int32
26537
+
maximum: 2147483647
26538
+
nullable: true
26539
+
type: integer
26540
+
days_without_flake:
26541
+
description: The number of days since the test last exhibited flakiness.
26542
+
example: 30
26543
+
format: int32
26544
+
maximum: 2147483647
26545
+
nullable: true
26546
+
type: integer
26547
+
failure_rate:
26548
+
description: The failure rate of the test at the time of the status change.
26549
+
example: 0.25
26550
+
format: double
26551
+
maximum: 1
26552
+
minimum: 0
26553
+
nullable: true
26554
+
type: number
26555
+
state:
26556
+
description: The previous state of the test.
26557
+
example: quarantined
26558
+
nullable: true
26559
+
type: string
26560
+
total_runs:
26561
+
description: The total number of test runs at the time of the status change.
26562
+
example: 200
26563
+
format: int32
26564
+
maximum: 2147483647
26565
+
nullable: true
26566
+
type: integer
26567
+
type: object
26568
+
FlakyTestHistoryPolicyMetaConfig:
26569
+
description: Configuration parameters of the policy that triggered this status change.
26570
+
properties:
26571
+
branches:
26572
+
description: The branches considered by the policy.
26573
+
example: ["main"]
26574
+
items:
26575
+
type: string
26576
+
nullable: true
26577
+
type: array
26578
+
days_active:
26579
+
description: The number of days a test must have been active for the policy to trigger.
26580
+
example: 30
26581
+
format: int32
26582
+
maximum: 2147483647
26583
+
nullable: true
26584
+
type: integer
26585
+
failure_rate:
26586
+
description: The failure rate threshold for the policy to trigger.
26587
+
example: 0.7
26588
+
format: double
26589
+
maximum: 1
26590
+
minimum: 0
26591
+
nullable: true
26592
+
type: number
26593
+
forget_branches:
26594
+
description: Branches excluded from the policy evaluation.
26595
+
example: ["release"]
26596
+
items:
26597
+
type: string
26598
+
nullable: true
26599
+
type: array
26600
+
required_runs:
26601
+
description: The minimum number of test runs required for the policy to trigger.
26602
+
example: 100
26603
+
format: int32
26604
+
maximum: 2147483647
26605
+
nullable: true
26606
+
type: integer
26607
+
state:
26608
+
description: The target state the policy transitions the test from.
26609
+
example: quarantined
26610
+
nullable: true
26611
+
type: string
26612
+
test_services:
26613
+
description: Test services excluded from the policy evaluation.
26614
+
example: ["my-service"]
26615
+
items:
26616
+
type: string
26617
+
nullable: true
26618
+
type: array
26619
+
type: object
26481
26620
FlakyTestPipelineStats:
26482
26621
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.
26483
26622
properties:
@@ -26557,6 +26696,14 @@ components:
26557
26696
FlakyTestsSearchFilter:
26558
26697
description: Search filter settings.
26559
26698
properties:
26699
+
include_history:
26700
+
default: false
26701
+
description: |-
26702
+
Whether to include the status change history for each flaky test in the response.
26703
+
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"}}
104
+
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"}}
105
105
When the request is sent
106
106
Then the response status is 200 OK
107
107
@@ -117,19 +117,21 @@ Feature: Test Optimization
117
117
Scenario: Search flaky tests returns "OK" response with history
118
118
Given operation "SearchFlakyTests" enabled
119
119
And new "SearchFlakyTests" request
120
-
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"}}
120
+
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"}}
121
121
When the request is sent
122
122
Then the response status is 200 OK
123
123
And the response "data[0].attributes" has field "history"
124
124
And the response "data[0].attributes.history[0]" has field "status"
125
125
And the response "data[0].attributes.history[0]" has field "commit_sha"
126
126
And the response "data[0].attributes.history[0]" has field "timestamp"
127
+
And the response "data[0].attributes.history[0]" has field "policy_id"
128
+
And the response "data[0].attributes.history[0]" has field "policy_meta"
0 commit comments