Skip to content

TestWatcher.testSkipped() should be invoked for tests not executed due to failures in @BeforeAll #4235

@joerg1985

Description

@joerg1985

I am using the TestWatcher to collect information for reporting the status of tests by implementing testDisabled, testSuccessful, testAborted, and testFailed. This is working fine as long as there is no failure inside a @BeforeAll or postProcessTestInstance method, in which case none of the TestWatcher methods is called, and the test is kind of lost.

To detect this state, a lot of other interfaces must be implemented, and information has to be combined. It would be better to have a complete view of the test results using only the TestWatcher.

Deliverables

  • TestWatcher.testSkipped(ExtensionContext context, ExtensionContext origin, Throwable reason) should be invoked for tests not executed at all
    • ExtensionContext origin argument with details about the failed ExtensionContext causing the test to get skipped
    • Throwable reason argument with details about the failure

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions