黄瓜中的逻辑AND和OR标记

时间:2019-01-18 05:40:11

标签: selenium cucumber

如何使用Cucumber中的标签应用逻辑AND和OR? 我已在以下代码段中应用了

@CucumberOptions(plugin = { "pretty" },
features = { "features" },
glue = { "stepdefs" },
tags = { "@SmokeTestCases" })

但是我想在标签中应用逻辑AND和OR 我该怎么办?

1 个答案:

答案 0 :(得分:3)

逻辑上或,您必须使用此命令: 对于用逗号分隔的OR逻辑

@CucumberOptions(plugin = { "pretty" },
features = { "features" },
glue = { "stepdefs" },
tags = { "@SmokeTestCases,@SanityTestCases" })

逻辑上,您必须使用以下命令: 对于用引号(“”)分隔的AND逻辑

@CucumberOptions(plugin = { "pretty" },
features = { "features" },
glue = { "stepdefs" },
tags = { "@SmokeTestCases","@SanityTestCases" })