Cucumber tests don't run from maven, but from Junit when I run my test Class. Please help!!!!

24 views
Skip to first unread message

Bharti Mahani

unread,
Jul 21, 2016, 9:21:25 AM7/21/16
to Cukes
Hello,
Can anyone suggest why I am not able to run any test using Maven. Why it says Tests run:0

1) Class is defined as Runner.Test
2) Depdency included <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.18.1</version>
            <scope>test</scope>
        </dependency>
3) Stepdefinition files path have been given under glue in my RunnerTest
3) If I run my RunnerTest.java file as Junit it runs all scenarios properly. Only when I run it using Maven, no tests are run :-(
4) I did mvn -Dtest=RunnerTest test, it says
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
12.4:test (default-test) on project MavenCucumber_RocketTV: No tests were execut
ed!  (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]
5) Then did mvn dependency:analyze

Nothing is under used-undeclared dependency. Only unused declred dependency found.

What else I am missing?
Have I missed any dependency? or is there any conflict happening?

Please refer my project structure image attached and my POM file.

The log says

Thanks,
Bharti
detailedLogs.txt
ProjectStructure.jpg
pom.xml
Reply all
Reply to author
Forward
0 new messages