Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

None of the features at [src/main/java/apitest/feature] matched the filters: [@ApiTest]

Open 1 Answers 133 Views
0 1

I have created a JUnit class with Cucumber annotations like this:

@CucumberOptions(features = {"src/main/java/apitest/feature/APIAuthentication"},
format = {"json:target/cucumber.json", "html:target/site/cucumber-pretty"},
glue = "apitest/steps",
plugin = {"pretty","html:reports/test-report"},
tags = {"@ApiTest"})
public class Runner extends AbstractTestNGCucumberTests{

Now src/main/java/apitest/feature contains 1-test case so 1-feature, so if 10 -test case then 10 -features
if i give src/main/java/apitest/feature in features = {"src/main/java/apitest/feature"} it is not picking the all the feature with its corresponding step

it says : None of the features at [src/main/java/apitest/feature] matched the filters: [@ApiTest]
0 Scenarios
0 Steps

Here is my .feature file:

In order to test the REST API TESTING
Scenario: To test the Login functionality
Given User provides the credentials username and password to authenticate
When The user gets logged in assert the status code as 302
Then get the session id created for further usage

Kindly advise.

1 Answer


Your features location should be


Also, it looks like the location of your step definition files mention in glue is wrong.

answered by (202 points)

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.