如何运行黄瓜测试使用命令行

如何运行黄瓜测试使用命令行

问题描述:

我有用黄瓜写的测试用java。我使用IDE IntelliJ。我可以从IDE UI运行,只需右键单击功能文件。但现在的要求是我需要使用命令行在jenkins中运行测试。

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.

探索maven选项,但有另一个问题的身份验证。

explore maven option but has another issue with authentication.

有没有其他方法通过命令行直接运行黄瓜功能?

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

https://cukes.info/running.html

按照描述创建空类,然后将空类作为junit运行,类似如下:

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