Closed jurec72 closed 1 year ago
This examples should work:
mvn verify -Dcucumber.filter.tags="@smoketest"
mvn verify -Dcucumber.filter.tags="@smoketest and @billing"
mvn verify -Dcucumber.filter.tags="@smoketest or @billing"
Thank you for answer, but I tried on serenity-cucumber-starter framework without any modification and it is not working, and on my framework as well not working. Please, see screenshot below! It always give an error - Unknown lifecycle.
That's a maven command syntax error, not a Serenity issue - there is something weird about the "-Dcucumber" bit. The command itself is correct, though. I can't reproduce it, on Windows or Mac.
@wakaleo you as always right, that commands are working. Found the solution:
If after '-D' you have multiple words, then use double quotes.
It is working for me like this:
mvn verify -D"cucumber.filter.tags"="@rrr or @bbb"
Thank you!
@jurec72 - How did you fix this issue . I’m facing similar problem. filter tag not working quotes as well . -Dtags works though like your case
@psrini7 - If after '-D' you have multiple words, then use double quotes. It is working for me like this: mvn verify -D"cucumber.filter.tags"="@rrr or @bbb"
@jurec72 Yeah I tried that too after seeing your earlier comment it didn’t work. Do you have both cucumber and serenity junit in dependency?
Yes, please check the dependencies above. On my end it is working this way -D"cucumber.filter.tags", but it should be working without double quotes. And I have no idea why it is working that way. I suggest to update maven and if Windows add MAVEN_HOME environment variables and try both ways. -D"cucumber.filter.tags" -Dcucumber.filter.tags
Hello, I am looking the way to run multiple tags in one command but all recommended solutions are not working or even can not find commands when try to run. I tried these commands - https://serenity-bdd.github.io/docs/guide/cucumber and none of them are working. Also, I thought maybe something wrong with my framework and I tried these commands on this framework https://github.com/serenity-bdd/serenity-cucumber-starter and it is also not working. Maybe there is any solution for this.?
Commands that are not working even for single tag:
mvn clean verify -Dcucumber.filter.tags="@90498" mvn clean verify -Dcucumber.options="--tags @90498"
With one tag only working command is:mvn clean verify -Dtags="@90940"
Thank you!
And below details of my framework:
Runner class:
`import io.cucumber.junit.CucumberOptions; import net.serenitybdd.cucumber.CucumberWithSerenity; import org.junit.runner.RunWith;
@RunWith(CucumberWithSerenity.class) @CucumberOptions( plugin = {"pretty", "rerun:target/serenity-reports/rerun.txt"}, features = "src/test/resources/features", glue = "steps", snippets = CucumberOptions.SnippetType.UNDERSCORE, stepNotifications = true, dryRun = false, tags = "@90498" ) public class Runner { }`
POM.XML file:
`<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
`