并行 运行 的标签逻辑
Tag logic for Parallel Run
通过并行方法标记的逻辑与黄瓜选项不同。如果能有一些文档就好了。
mvn -Doptions="--tags @integration --tags @x --tags ~@wip" 不适用于将标签作为集成或 x
根据我的理解,以上代表@CucumberOptions(tags = {"@integration","@x","~@wip"}
如果我给出 mvn -Doptions="--tags @integration,@x" 那么它将执行带有标签集成或 x 的场景。
public static List<String> setTags(String options){
logger.info("Tag input from maven command:"+options);
logger.info("Parsing all the tags");
List<String> allTags = new ArrayList<>();
List<String> tags = Arrays.asList(options.split("--tags"));
for (String tag : tags) {
if (StringUtils.isNotEmpty(tag)) {
logger.info("Tags selected are:" + tag.trim());
allTags.add(tag);
}
}
return allTags;
}
public static List<String> getTags(){
if(StringUtils.isNotEmpty(System.getProperty("options"))) {
return setTags(System.getProperty("options"));
}else throw new RuntimeException("Please select a tag for execution");
}
我在 director 中获取所有功能文件并将标签作为列表传递的并行方法。
KarateStats stats = CucumberRunner.parallel(PipelineRunner.getTags(), PipelineRunner.getAllFeatureFiles(featureDir), 1, karateOutputPath);
文件1
@整合
情景:等等等等
文件2
@x
场景:废话废话
Based on my understanding the above represent @CucumberOptions(tags = {"@integration","@x","~@wip"}
不,那是错误的。请参阅此博客 post,它甚至链接到空手道文档:https://testingneeds.wordpress.com/2015/09/15/junit-runner-with-cucumberoptions/
这应该是您要找的。
@CucumberOptions(tags = {"@integration,@x", "~@wip"})
如果您仍然遇到问题,我们可以解决它 - 但请按照此处的流程操作:https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
通过并行方法标记的逻辑与黄瓜选项不同。如果能有一些文档就好了。
mvn -Doptions="--tags @integration --tags @x --tags ~@wip" 不适用于将标签作为集成或 x
根据我的理解,以上代表@CucumberOptions(tags = {"@integration","@x","~@wip"}
如果我给出 mvn -Doptions="--tags @integration,@x" 那么它将执行带有标签集成或 x 的场景。
public static List<String> setTags(String options){
logger.info("Tag input from maven command:"+options);
logger.info("Parsing all the tags");
List<String> allTags = new ArrayList<>();
List<String> tags = Arrays.asList(options.split("--tags"));
for (String tag : tags) {
if (StringUtils.isNotEmpty(tag)) {
logger.info("Tags selected are:" + tag.trim());
allTags.add(tag);
}
}
return allTags;
}
public static List<String> getTags(){
if(StringUtils.isNotEmpty(System.getProperty("options"))) {
return setTags(System.getProperty("options"));
}else throw new RuntimeException("Please select a tag for execution");
}
我在 director 中获取所有功能文件并将标签作为列表传递的并行方法。
KarateStats stats = CucumberRunner.parallel(PipelineRunner.getTags(), PipelineRunner.getAllFeatureFiles(featureDir), 1, karateOutputPath);
文件1 @整合
情景:等等等等
文件2 @x
场景:废话废话
Based on my understanding the above represent @CucumberOptions(tags = {"@integration","@x","~@wip"}
不,那是错误的。请参阅此博客 post,它甚至链接到空手道文档:https://testingneeds.wordpress.com/2015/09/15/junit-runner-with-cucumberoptions/
这应该是您要找的。
@CucumberOptions(tags = {"@integration,@x", "~@wip"})
如果您仍然遇到问题,我们可以解决它 - 但请按照此处的流程操作:https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue