Do you have questions ? We got the answers!

Ask a question:

0
Error: Could not find or load main class cucumber.cli.Main

Solved 1 Answers 284 Views
I am getting below error while executing tests using cucumber 1.2.5

 

"C:\Program Files\Java\jdk1.8.0_131\bin\java" -Dorg.jetbrains.run.directory=C:\Users\Administrator\IdeaProjects\cucumber-selenium-webdriver-demo\src\test\resources\com\qamate "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.1\lib\idea_rt.jar=57249:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\rt.jar;C:\Users\Administrator\IdeaProjects\cucumber-selenium-webdriver-demo\target\test-classes;C:\Users\Administrator\.m2\repository\info\cukes\cucumber-java\1.2.5\cucumber-java-1.2.5.jar;C:\Users\Administrator\.m2\repository\info\cukes\cucumber-core\1.2.5\cucumber-core-1.2.5.jar;C:\Users\Administrator\.m2\repository\info\cukes\cucumber-html\0.2.3\cucumber-html-0.2.3.jar;C:\Users\Administrator\.m2\repository\info\cukes\cucumber-jvm-deps\1.0.5\cucumber-jvm-deps-1.0.5.jar;C:\Users\Administrator\.m2\repository\info\cukes\gherkin\2.12.2\gherkin-2.12.2.jar;C:\Users\Administrator\.m2\repository\info\cukes\cucumber-junit\1.2.5\cucumber-junit-1.2.5.jar;C:\Users\Administrator\.m2\repository\junit\junit\4.10\junit-4.10.jar;C:\Users\Administrator\.m2\repository\org\hamcrest\hamcrest-core\1.1\hamcrest-core-1.1.jar;C:\Users\Administrator\.m2\repository\org\seleniumhq\selenium\selenium-java\2.20.0\selenium-java-2.20.0.jar;C:\Users\Administrator\.m2\repository\org\seleniumhq\selenium\selenium-android-driver\2.20.0\selenium-android-driver-2.20.0.jar;C:\Users\Administrator\.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\2.20.0\selenium-remote-driver-2.20.0.jar;C:\Users\Administrator\.m2\repository\cglib\cglib-nodep\2.1_3\cglib-nodep-2.1_3.jar;C:\Users\Administrator\.m2\repository\org\json\json\20080701\json-20080701.jar;C:\Users\Administrator\.m2\repository\com\google\guava\guava\11.0.1\guava-11.0.1.jar;C:\Users\Administrator\.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\Users\Administrator\.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\2.20.0\selenium-chrome-driver-2.20.0.jar;C:\Users\Administrator\.m2\repository\org\seleniumhq\selenium\selenium-htmlunit-driver\2.20.0\selenium-htmlunit-driver-2.20.0.jar;C:\Users\Administrator\.m2\repository\org\seleniumhq\selenium\selenium-api\2.20.0\selenium-api-2.20.0.jar;C:\Users\Administrator\.m2\repository\net\sourceforge\htmlunit\htmlunit\2.9\htmlunit-2.9.jar;C:\Users\Administrator\.m2\repository\xalan\xalan\2.7.1\xalan-2.7.1.jar;C:\Users\Administrator\.m2\repository\xalan\serializer\2.7.1\serializer-2.7.1.jar;C:\Users\Administrator\.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\Administrator\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\Administrator\.m2\repository\org\apache\httpcomponents\httpmime\4.1.2\httpmime-4.1.2.jar;C:\Users\Administrator\.m2\repository\commons-codec\commons-codec\1.4\commons-codec-1.4.jar;C:\Users\Administrator\.m2\repository\net\sourceforge\htmlunit\htmlunit-core-js\2.9\htmlunit-core-js-2.9.jar;C:\Users\Administrator\.m2\repository\xerces\xercesImpl\2.9.1\xercesImpl-2.9.1.jar;C:\Users\Administrator\.m2\repository\xml-apis\xml-apis\1.3.04\xml-apis-1.3.04.jar;C:\Users\Administrator\.m2\repository\net\sourceforge\nekohtml\nekohtml\1.9.15\nekohtml-1.9.15.jar;C:\Users\Administrator\.m2\repository\net\sourceforge\cssparser\cssparser\0.9.5\cssparser-0.9.5.jar;C:\Users\Administrator\.m2\repository\org\w3c\css\sac\1.3\sac-1.3.jar;C:\Users\Administrator\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\Administrator\.m2\repository\org\apache\httpcomponents\httpclient\4.1.2\httpclient-4.1.2.jar;C:\Users\Administrator\.m2\repository\org\apache\httpcomponents\httpcore\4.1.2\httpcore-4.1.2.jar;C:\Users\Administrator\.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\2.20.0\selenium-firefox-driver-2.20.0.jar;C:\Users\Administrator\.m2\repository\commons-io\commons-io\2.0.1\commons-io-2.0.1.jar;C:\Users\Administrator\.m2\repository\org\apache\commons\commons-exec\1.1\commons-exec-1.1.jar;C:\Users\Administrator\.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\2.20.0\selenium-ie-driver-2.20.0.jar;C:\Users\Administrator\.m2\repository\net\java\dev\jna\jna\3.4.0\jna-3.4.0.jar;C:\Users\Administrator\.m2\repository\net\java\dev\jna\platform\3.4.0\platform-3.4.0.jar;C:\Users\Administrator\.m2\repository\org\seleniumhq\selenium\selenium-iphone-driver\2.20.0\selenium-iphone-driver-2.20.0.jar;C:\Users\Administrator\.m2\repository\org\seleniumhq\selenium\selenium-support\2.20.0\selenium-support-2.20.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.1\plugins\cucumber-java\lib\cucumber-jvm-formatter.jar" cucumber.cli.Main --format org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter --monochrome --glue com.qamate.step_definations C:/Users/Administrator/IdeaProjects/cucumber-selenium-webdriver-demo/src/test/resources/com/qamate/checkout.feature
Testing started at 7:14 AM ...
Error: Could not find or load main class cucumber.cli.Main

Process finished with exit code 1

1 Answer

1
Best answer
It looks like a problem with your JUnit. Update your JUnit to 4.12.

It should resolve the problem.
answered May 13 by anonymous
selected May 14 by stbadmin

Top Contributors

  • 4970 pointsstbadmin

    34 questions 454 answers218 comments

  • 430 pointsSunilBhaskar

    40 questions 14 answers26 comments

  • 425 pointsMehedi

    36 questions 3 answers14 comments

  • 354 pointsSoft Tester

    43 questions 0 answers4 comments

  • 342 pointssumitkumarwatts

    0 questions 12 answers0 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

...