i have two custom tags which are configured for different tests:
Feature: Test cucumber tags
@with-service
Scenario: Test with service
...
@without-service
Scenario: Test without service
...
Currently i run the tests by choosing the tag in the CucumberOptions():
@RunWith(Cucumber.class)
@CucumberOptions(
plugin = {"pretty"},
tags = "@with-service",
features = "classpath:/features"
)
public class CucumberRunner {
}
But with this approach i have to manually change the tag to run different use-cases.
What I would like to archive is to have a feature flag defined in the application-test.yml and when the feature flag is true then run tag @with-service, otherwise run tag @without-service. Can someone please give me a hint how can i archive this? Thank you very much!