Reputation: 2762
I had coded in cucumber 6 and tried to run in intellij. This code will be run in CI/CD environment as well.
How to run cucumber 6 in CLI?
I tried with the following code but resulted error.
java cucumber.api.cli.Main
Please see error below.
Error: Could not find or load main class cucumber.api.cli.Main
Caused by: java.lang.ClassNotFoundException: cucumber.api.cli.Main
JUnit 4 Runner
java -cp target/ org.junit.runner.JUnitCore com.cimb.TestManager.ParallelRunner
Error
Error: Could not find or load main class org.junit.runner.JUnitCore
Caused by: java.lang.ClassNotFoundException: org.junit.runner.JUnitCore
Upvotes: -1
Views: 222
Reputation: 11
Try: java -cp <path to cucumber jar folder> io.cucumber.core.cli.Main -g <glue_path> <feature_path>
Upvotes: 1