how to run cucumber test using command line

2019-08-07 18:43发布

I have test cases written in cucumber with java. I am using IDE IntelliJ. I can run from IDE UI by simply right click a feature file. but now the requirement is I need to run tests in jenkins using command line.

explore maven option but has another issue with authentication.

is there any other way to directly run cucumber features through command line?

标签: cucumber
1条回答
Deceive 欺骗
2楼-- · 2019-08-07 19:01

See the JUnit section here: https://cukes.info/running.html

Create the empty class as described and then run the empty class as a junit with something like this:

java -cp .:/usr/share/java/junit.jar org.junit.runner.JUnitCore RunCukesTest
查看更多
登录 后发表回答