Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Order in executing specflow features

Can I somehow force execution order in my features and scenarios or in Nunit tests which are generated from specflow feature file? It would be nice if I could first test all my data entering features, and than data modifying and than data deleting features.

like image 359
Vajda Avatar asked Jan 28 '11 17:01

Vajda


1 Answers

I think that's more of a question for your test runner of choice. SpecFlow generates the tests for you from your test file, but it does not run them. You might be able to direct your test runner to run the scenarios in the order you ask.

However, my advice is that you do not attempt to order your tests. Each scenario should be be completely independent from others, so that the order the tests are run has no impact on the results. I guess it depends on what you mean by it being "nice" if they are run in a specific order. :)

like image 74
Darren Avatar answered Sep 24 '22 20:09

Darren