Reputation: 93
I have following problem, i have class (ExoertTest.java) with one feature (with @expert tag):
package opi;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/test/resources/features/Expert.feature",
tags = "@expert"
)
public class ExpertTest {
}
I want run only this one feature from maven with command
mvn clean test -Ptest -Dcucumber.options="--tags @expert"
but no tests are executed, logs from console:
[INFO] Running opi.ExpertTest None of the features at [src/test/resources/features/Expert.feature] matched the filters: [@expert]
0 Scenarios 0 Steps 0m0,000s
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 s - in opi.ExpertTest
Do You know why Cucumber dont see my @expert tag and this case is not executed?
I use Cucumber with Selenide
Upvotes: 1
Views: 357
Reputation: 93
Ok, i put tags in feature file instead of CucumberOptions in TestRunner.class and it works
Upvotes: 1