Skip to content

[SDTEST-2984] Added test.final_status tag for the tests#190

Merged
ypopovych merged 2 commits into
mainfrom
sdtest-2984-test-final-status
Feb 10, 2026
Merged

[SDTEST-2984] Added test.final_status tag for the tests#190
ypopovych merged 2 commits into
mainfrom
sdtest-2984-test-final-status

Conversation

@ypopovych

Copy link
Copy Markdown
Contributor

What and why?

Added test.final_status to the test spans, reporting the status sent to the test framework for the last retry (failed/skipped/passed) etc.

How?

Add status in the testWillFinish hook.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new test.final_status span tag to report the final status outcome for a test after retries complete (i.e., the status of the last execution that is ultimately reported), and updates feature tests to validate the tag is present exactly once per test.

Changes:

  • Introduce DDTestTags.testFinalStatus = "test.final_status".
  • Set test.final_status in RetryAndSkipTags.testWillFinish only on the final execution (including correcting fail→pass when failures are suppressed).
  • Extend existing feature tests (ITR, EFD, ATR) to assert test.final_status is set exactly once and matches the last run’s expected outcome.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Sources/DatadogSDKTesting/DDTags.swift Adds the new test.final_status tag constant.
Sources/DatadogSDKTesting/RetryAndSkipTags.swift Populates test.final_status on the last run (and adjusts for suppressed failures).
Tests/DatadogSDKTesting/Features/TestImpactAnalysisTests.swift Validates test.final_status for skipped and failed ITR scenarios.
Tests/DatadogSDKTesting/Features/EarlyFlakeDetectionTests.swift Validates test.final_status across EFD retry scenarios (pass/fail) and non-retried cases.
Tests/DatadogSDKTesting/Features/AutoTestRetriesTests.swift Validates test.final_status across ATR retry scenarios (pass/fail) and limits.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@calvinbayer

Copy link
Copy Markdown
Contributor

What about tests for the Flaky Test Management features? Quarantine, Disabled, and Attempt to fix?

@ypopovych
ypopovych merged commit 6fcc9d6 into main Feb 10, 2026
1 check passed
@ypopovych
ypopovych deleted the sdtest-2984-test-final-status branch February 10, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants