Cucumber 按行号上的范围运行场景大纲

Cucumber 按行号上的范围运行场景大纲,cucumber,Cucumber,我知道在cucumber中运行特定示例是可能的 cucumber tests/features/my.feature:141 #just example 141 cucumber tests/features/my.feature:141:151 #just examples 141 & 151 运行从141到151的一系列示例的语法是什么 cucumber tests/features/my.feature:141-151 #this does not work 如果有帮助,下面是

我知道在cucumber中运行特定示例是可能的

cucumber tests/features/my.feature:141 #just example 141
cucumber tests/features/my.feature:141:151 #just examples 141 & 151
运行从141到151的一系列示例的语法是什么

cucumber tests/features/my.feature:141-151 #this does not work
如果有帮助,下面是场景大纲片段。。。假设“tc-44”位于文件的第141行

Scenario Outline: running scenario subset of examples 
Given we are testing a subset
 And it is a scenario outline with many examples
Then we can run a subset by providing a range
Examples:
| test-case |
| tc-44 |
| tc-45 |
| tc-46 |
| tc-47 |
| tc-48 |
| tc-49 |
...
| tc-100 |

在命令行中,可以使用行号之间的冒号从同一功能文件运行特定方案,如下所示:

cucumber tests/features/my.feature:37:52
如果在第37行和第52行定义了场景,那么这两个场景都将由cucumber执行

同样,您也可以通过引用特定示例的行号来运行这些示例。在您的情况下,这将起作用:

cucumber tests/features/my.feature:141:142:143:144:145:146:147:148:149:150:151
Cucumber将执行在每个行号处找到的示例