如何运行黄瓜测试使用命令行 [英] how to run cucumber test using command line

查看:396
本文介绍了如何运行黄瓜测试使用命令行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有用黄瓜写的测试用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

这篇关于如何运行黄瓜测试使用命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆