Skip to content

Find all local @TestExecutionListeners annotations on a test class #26141

Closed as not planned
@stolsvik

Description

@stolsvik

When using TestExecutionListeners, I have multiple times ended up getting severely hampered by the fact that there can (evidently) only be one such annotation per test run - any more, and the latest supersedes the previous.

This is unfortunate as the TestExecutionListener can be used as a meta-annotation. I've tried to make some nice bespoke annotations that can be used in our shop that can be slapped on the test case - but that fails if the test also includes a @TestExecutionListeners annotation - or a second bespoke annotation that also needs to add itself as a TestExecutionListener.

I don't quite see how this would fit into the existing annotation (as the two modes there - REPLACE_DEFAULTS and MERGE_WITH_DEFAULTS - might not be open for further extension?). Maybe a new AppendTestExecutionListeners?

See also #26142

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: testIssues in the test modulestatus: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions