cucumber(Java 中):如何仅使用两个标签运行场景

2022-01-22 00:00:00 tags cucumber scenarios java

我有一些功能文件,每个场景都有多个标签.但我想运行那些同时拥有@a 和@b 场景的人.我该怎么做?

I have some feature files with multiple tags for each scenario. But I would like to run those who has both @a AND @b scenarios. How can I do that?

    tags = {"@a, @b"},  --> this will do @a OR @b scenarios

谢谢.

推荐答案

我想通了:tags = {"@a, @b"}, --> 这将执行 @a OR @b 场景tags = {"@a", "@b"}, --> 这将适用于 @a AND @b 场景

I figured it out: tags = {"@a, @b"}, --> this will do @a OR @b scenarios tags = {"@a", "@b"}, --> this will do @a AND @b scenarios

相关文章