logical AND and OR tags in Cucumber

Viewed 497

How we can apply logical AND and OR using tags in Cucumber? I have applied below snippet

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

but I want to apply logical AND and OR in tags How can I do this?

1 Answers

Logically OR you have to use this: For OR logic sapareted with comma(,)

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

Logically AND you have to use this: For AND logic separated with quotes("")

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