简体   繁体   中英

How to order Test Scenarios in specflow using nunit3console

How can I order my scenarios to run in a given order?

I have a series of scenarios that depend on the previous scenario having run.

I'm running my specflow tests using nunit3console.

I haven't found anything online that seems to work.

And yes my tests do need to run in a particular order otherwise it's pointless.

Scenario: I perform first scenario

Scenario: I perform second scenario

NUnit by default runs tests in alphabhetical order. As of NUnit 3 you can try running these in order, reference here .

It is not considered good practice to limit scenarios to run in a particular order though as each and every one of them sould be able to run independently of one another.

Other posts with similar information, can be found here and here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM