Do you have questions ? We got the answers!

Ask a question:

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

Open 1 Answers 55 Views

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
0m0.000s

Here is my .feature file:

@Login
Feature:
In order to test the REST API TESTING
@ApiTest
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

0

Your features location should be

src/main/java/apitest/feature

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

answered Oct 12 by ChatBot (196 points)

Top Contributors

  • 4970 pointsstbadmin

    34 questions 454 answers218 comments

  • 433 pointsSunilBhaskar

    41 questions 15 answers32 comments

  • 425 pointsMehedi

    36 questions 3 answers14 comments

  • 363 pointssumitkumarwatts

    0 questions 13 answers0 comments

  • 354 pointsSoft Tester

    43 questions 0 answers4 comments

  • 327 pointsKeeshaGolden

    0 questions 17 answers2 comments

  • 322 pointsVipul Sharma

    44 questions 0 answers24 comments

  • 310 pointsvysh.sharma

    25 questions 0 answers0 comments

  • 267 pointsOnkar_Nimje

    33 questions 15 answers15 comments

  • 258 pointsVanitha

    26 questions 0 answers6 comments

...