Skip to content

Allow before/after TestMethod code with registering global callback #2673

@starosta33

Description

@starosta33

the semantic should be something similar as below:

Note: this is allowed in NUnit already (BeforeTest & AfterTest hooks)

public class BeforeAfterTestMethodGlobalHook
{
    [GlobalBeforeTestMethod]
    public async Task BeforeTestMethodAsync(TestContext testContext)
    {
        // ...
    }

    [GlobalAfterTestMethod]
    public async Task AfterTestMethodAsync(TestContext testContext)
    {
        // ...
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: DesignNeeds research and proposal for how the feature will be implemented.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions