Skip to content

How to set priority for scenarios in the feature file #289

Discussion options

You must be logged in to vote

If you start the app in beforetestrun and then on afterscenario make sure to reset its state and run everything sequentially (so not parallel) the test run order should not matter.

It is generally a bad practice to make scenarios depend on each other as they're then typically not really describing a scenario anymore.

If you really want to go down this path you've taken (and I'd seriously reconsider doing so) you can take a look at https://hamidmosalla.com/2018/08/16/xunit-control-the-test-execution-order/ there's a way to plug in this attribute through our plugin system.

Btw the steps should not have the Fact attribute as the steps merely describe steps in the final tests and are not test…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@pritesh848
Comment options

@ajeckmans
Comment options

Answer selected by pritesh848
@pritesh848
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants