如何使用outline使用特定数据运行cucumber测试?

如何使用outline使用特定数据运行cucumber测试?,cucumber,Cucumber,如果我想运行,它将需要1,2,1,2 但是我需要我的测试应该以as 1运行。不需要从2获取数据 有什么想法吗 提前感谢。您可以标记示例并按如下方式部分运行它们: Given "step" like "description" Example: | step | description | | 1 | first

如果我想运行,它将需要1,2,1,2

但是我需要我的测试应该以as 1运行。不需要从2获取数据

有什么想法吗


提前感谢。

您可以标记示例并按如下方式部分运行它们:

Given "step" like "description"                              
  Example:                                     
  | step | description |                
  |  1   | first       |                 
  |  2   | second      |           
  |  1   | third       |            
  |  2   | fourth      |
要仅使用1s运行数据,请执行以下操作:

Given "step" like "description"  

    @ones                            
  Examples:                                     
  | step | description |                
  |  1   | first       |                 
  |  1   | third       |            

    @twos                            
  Examples:                                     
  | step | description |                
  |  2   | second      |           
  |  2   | fourth      |
或使用2s排除数据:

$cucumber --tags @ones

谢谢你的回复,普拉卡什。现在我可以使用特定的数据运行。
$cucumber --tags ~@twos