Skip to content

Extensible Test Cancellation #5558

Open
@thomhurst

Description

@thomhurst

If I wanted to write an extension that could cancel the test session based on some logic, I don't believe that's currently possible.

I can see there's an (internal) ITestSessionContext in the ServiceProvider. But that only exposed a cancellation token.

Exposing a CancellationTokenSource, or just a Cancel() method could be helpful.

I can (and do) create my own linked cancellation token source in TUnit, but a generic extension would have no concept of that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: MTPBelongs to the Microsoft.Testing.Platform core library

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions