简体   繁体   English

如何使用nunit3console在specflow中订购测试方案

[英]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.

相关问题 如何使用 vstest.console.exe 在 cmd 中运行 Specflow 功能/场景? - How to run Specflow feature/scenarios in cmd using vstest.console.exe? 使用 specsync 将 Specflow 方案(功能文件方案)与 Azure DevOps 测试计划同步 - Sync Specflow scenarios (feature file scenarios) with Azure DevOps Test plan using specsync Specflow 场景在测试资源管理器中按字母顺序排序。 有什么办法可以改变这个顺序? - Specflow scenarios are sorted in alphabetical order in test explorer. Any way to change that order? 如何在不使用 visual studio 的情况下让其他人看到 specflow 场景 - How to make specflow scenarios visible to others without using visual studio 在Nunit控制台上运行Specflow 3.0报告 - Running Specflow 3.0 reports on Nunit console 使用nunit控制台传递测试用例参数 - pass test case parameters using nunit console C#项目中的Specflow和Nunit单元测试 - Specflow in c# project and Nunit unit test 如何从NUnit测试中启动控制台 - How to launch Console from inside a NUnit test 如何使用 nunit 测试 DbProviderFactories - How to test DbProviderFactories using nunit 使用 Nunit3-Console.exe 运行 specflow 测试,但仅检测来自一个命名空间的测试 - Using Nunit3-Console.exe to run specflow tests but detects tests from only one namespace
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM