我们如何根据要求使用同一运行器类来运行多个要素文件和所有要素文件?

时间:2019-07-18 13:54:42

标签: karate

  1. 我有5个功能文件,我想运行一些功能文件取决于一个跑步者类的要求,是否可以,如果可以,怎么办?

1 个答案:

答案 0 :(得分:1)

1)您可以在“空手道选项”中运行所需的功能添加功能的路径:

closest text to the center cluster 1=['this is text two','this is text three']
closest text to the center cluster 2=['that are three','that are four']
closest text to the center cluster 3=['rossi is motogp racer']

2)您可以运行所需的功能部件或方案,并在“空手道选项”中向该功能部件或方案添加标签:

@RunWith(Karate.class)
@KarateOptions(features = "classpath:animals/cats/required.feature")
public class CatsPostRunner {

}

3)您也可以将方法1和2结合起来:

@RunWith(Karate.class)
@KarateOptions(tags = "@someTag") 
public class CatsPostRunner {

}

您可以在Karate Options中找到更多信息。

相关问题