简体   繁体   中英

How to Run Cucumber 6 CLI

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

Try: java -cp <path to cucumber jar folder> io.cucumber.core.cli.Main -g <glue_path> <feature_path>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM