Repository navigation
Support test automation exclusions in ScalaTest #12946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: codex/karate-automation-exclusions
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| package org.example | ||
|
|
||
| import datadog.trace.api.civisibility.TestAutomationExclusions | ||
| import org.scalatest.Tag | ||
| import org.scalatest.funsuite.AnyFunSuite | ||
|
|
||
| class TestAutomationExcluded extends AnyFunSuite { | ||
| private val noRetry = new Tag(TestAutomationExclusions.NO_AUTO_RETRY) | ||
| private val preventSuppression = new Tag(TestAutomationExclusions.PREVENT_FAILURE_SUPPRESSION) | ||
|
|
||
| test("protected_failure", noRetry, preventSuppression) { | ||
| assert(false) | ||
| } | ||
|
|
||
| ignore("protected_skip", noRetry, preventSuppression) { | ||
| assert(false) | ||
| } | ||
|
Comment on lines
+11
to
+17
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like a coverage gap to me. Should there be separate tests for noRetry and preventSuppression?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the ScalaTest fixture only exercises the two tags together, so it does not independently verify each flag at the integration boundary. The shared policy has a noRetry-only test, and reporting is parameterized over the individual tags, but those do not replace separate ScalaTest cases. I found no demonstrated behavior bug in the independent flag paths; I am deferring the additional integration coverage for discussion under the current bug-fix-only scope. |
||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.