Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Provide a way for a scenario to detect that the scenario is ending. #681

Open
ctissellb opened this issue Apr 12, 2024 · 2 comments
Labels
5.7 new feature New feature or request
Milestone

Comments

@ctissellb
Copy link

We frequently need to run multiple scenarios simultaneously. Some of these run a continuous loop and need to be able to detect when the primary testing scenario is finished. The request here is to provide a way for Steps to be aware that it's time for the scenario to end.

@AntyaDev AntyaDev added 5.7 new feature New feature or request labels Apr 30, 2024
@AntyaDev
Copy link
Contributor

AntyaDev commented Jun 2, 2024

Hi @ctissellb ,

I was thinking about the API for this feature, and I want to keep it as simple as possible.

Scenario.Create()
             .WithoutWarmup() 
             .WhenFinish(context => 
             {
                 // here you can call some shared CancellationToken 
                 // to signal other running Scenarios that you finished
                 return Task.Completed
             });

What do you think about this?

@AntyaDev AntyaDev added this to the 5.7.0 milestone Jun 2, 2024
@ctissellb
Copy link
Author

Yes, we prioritize simplicity as well. Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.7 new feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants