Skip to content

[Feature]: ExplicitAttribute behaviour opt-out #5518

@teneko

Description

@teneko

Problem Statement

Currently if annotating tests with ExplicitAttribute, these tests cannot be mixed with non-explicit tests. Which is a bummer, when your test surface is complex and you have to write a wrapper, that simplifies the control of which tests you want to test including explicit tests. Currently you only can select the subset of a test pool which is explicit or not explicit.

Proposed Solution

A way to opt-out the usage ExplicitAttribute as I would have not annotated the tests with ExplicitAttribute.

It could be solved by

  • built-in MSBuild-driven opt-out for behaviour of ExplicitAttribute or
  • making ExplicitAttribute pattern-matched so we mimick the behaviour of ExplicitAttribute but annotate it by ConditionalAttribute or similiar approach, to make it opt-out.

Alternatives Considered

#if FEATURE_FLAG_A
[ExplicitAttribute]
#endif

But.. well.. make that for every usage of ExplicitAttribute.. 😆

Feature Category

Test Discovery / Attributes

How important is this feature to you?

None

Additional Context

No response

Contribution

  • I'm willing to submit a pull request for this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions