空手道中的多个标签使用和条件

发布于 2025-01-24 21:51:18 字数 803 浏览 1 评论 0原文

在我的情况下,我有以下各种标签。这些方案分布在多个功能文件中。

  1. @smoke
  2. @smoke @smoke @prod
  3. @prod @regression
  4. @regression @prod

我正在通过命令行执行空手道罐子:

java -cp some-jar-with-dependecies:. -Dkarate.config.dir=. -jar  some-jar-with-dependecies.jar *.feature -T 1 -t "@smoke","@prod" -e prod

我期望仅使用@smoke @smoke @prod IE仅#2 @smoke @smoke @prod @prod> 2 执行。

但是我正在获得#1,#2,#4变体的报告。似乎命令行中提到的标签正在用作条件(@smoke或 @ prod)。

我试图在标签中使用条件调用场景。

请帮助我如何使用标签条件(@smoke和@prod)执行方案。

我在堆栈溢出中发现了一些类似的问题。但是这些解决方案对我不起作用: 使用多个标签在空手道选项中运行

I have the below variety of tags in my scenarios. These scenarios are distributed in multiple feature files.

  1. @smoke
  2. @smoke @prod
  3. @Regression
  4. @Regression @prod

I am executing karate jars via command line as below:

java -cp some-jar-with-dependecies:. -Dkarate.config.dir=. -jar  some-jar-with-dependecies.jar *.feature -T 1 -t "@smoke","@prod" -e prod

I was expecting scenarios with only @smoke @prod i.e only #2 to get executed.

But I am getting reports with #1,#2,#4 variations. It seems the tags mentioned in the command line are working as OR condition (@smoke or @ prod).

I am trying to call the scenarios with an AND condition in the tag.

Please help me on how to execute the scenarios with a tag AND condition (@smoke AND @prod).

I found some similar questions in Stack Overflow. But those solutions are not working for me:
Using multiple tags to run in karate options

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽手叙旧 2025-01-31 21:51:18

您是否尝试过:

-t @smoke -t @prod

也应该是“烟雾和产品”

-t @smoke -t @prod,@reg

应该是“烟雾,(prod or grod)”

Did you try:

-t @smoke -t @prod

Which should be "smoke and prod"

Also:

-t @smoke -t @prod,@reg

Should be "smoke AND (prod OR reg)"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文