prashant-ramcharan / courgette-jvm-selenium

Courgette-JVM with Selenium Example
3 stars 2 forks source link

Error: Could not find or load main class io.cucumber.core.cli.Main #8

Closed sobey83 closed 1 year ago

sobey83 commented 2 years ago

While I do mvn test in Eclipse using Java Cucumber , I was getting file length issues, so I added classPath option as you suggested @RunWith(Courgette.class) as below @RunWith(Courgette.class) @CourgetteOptions( threads = 1, runLevel = CourgetteRunLevel.SCENARIO, rerunFailedScenarios = true, rerunAttempts = 1, testOutput = CourgetteTestOutput.CONSOLE, reportTitle = "Reports", reportTargetDir = "com.project.qa.Cucumber-reports/HtmlReport", environmentInfo = "browser=chrome; git_branch=master", classPath = {"lib/*","target"},

But was getting below error Error: Could not find or load main class io.cucumber.core.cli.Main Caused by: java.lang.ClassNotFoundException: io.cucumber.core.cli.Main

Please help me on how to add classPath to avoid this error

prashant-ramcharan commented 2 years ago

Please refer to the classpath example project here: https://github.com/prashant-ramcharan/courgette-jvm-classpath-example