Skip to content

SwiftTesting with Nested Annotated Suites causes duplicate test report #257

Description

@Mordil

The thing

If you have nested suites with explicit annotations with .datadogTesting, they get reported twice for the same test session to Datadog.

Example:

@Suite(.datadogTesting)
struct OuterSuite {
    @Suite(.datadogTesting) {
    struct InnerSuite {
        @Test func myTest() { }
    }
}

I only see the test ran once in the CI logs, but in Datadog it showed two results

Image Image

Edge Case

This is an edge case. If you DO NOT explicitly annotate the nested suite, it reports as expected only 1 time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions