Order when executing specflow functions

Can I somehow give the order of execution in my functions and scripts or in the Nunit tests that are generated from the specflow function file? It would be nice if I could first check all my data included in the functions, and not for changing the data, as well as for deleting the data.

+3
source share
2 answers

I think there are more questions for your tester of choice. SpecFlow generates tests for you from the test file, but it does not run them. You may be able to direct your tester to run scripts in the order you specify.

However, my advice is that you are not trying to order your tests. Each script should be completely independent of the others, so the order in which the tests run does not affect the results. I think it depends on what you mean by this, β€œgood” if they are executed in a specific order. :)

+6
source

I use resharper pluggin to run tests. So, here is what is being done to make them ok (I know this is not a good idea, but I have a special case :))

Resharper orders the tests in alphabetical order for a given function file.

So, I called the scripts with prefixes 1,2,3, etc. according to the order I want them to run.

Dirty but ok if you are desperate;)

+1
source

Source: https://habr.com/ru/post/1788552/


All Articles