how to run cucumber test using command line

邮差的信 提交于 2019-12-13 01:28:25

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/29003830/how-to-run-cucumber-test-using-command-line

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!