cucumber(Java 中):如何仅使用两个标签运行场景 [英] cucumber (in Java): How can I run scenarios with both tags only

查看:20
本文介绍了cucumber(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

这篇关于cucumber(Java 中):如何仅使用两个标签运行场景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆