[英]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. 我正在使用nunit3console运行我的specflow测试。
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. NUnit默认情况下按字母顺序运行测试。 As of NUnit 3 you can try running these in order, reference here .
从NUnit 3开始,您可以尝试按顺序运行它们,请参考此处 。
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 . 其他类似信息的帖子可以在此处和此处找到。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.