Cucumber runner 类的 Intellij IDEA 运行配置 [英] Intellij IDEA Run configurations for Cucumber runner class

查看:57
本文介绍了Cucumber runner 类的 Intellij IDEA 运行配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Intellij IDEA 的新手.我有一个基于 POM 的黄瓜硒项目,我在其中为每个功能文件创建了黄瓜跑步者类.在使用 Eclipse 时,我可以通过右键单击来执行这些运行程序类.然而,在 Intellij IDEA(许可版本)中,即使在设置窗口中启用了 Cucumber-for-java 和 junit 插件,我也没有得到运行选项.

I am new to Intellij IDEA. I have a POM based cucumber-selenium project, where I've created cucumber runner classes for each feature file. While working with Eclipse I was able to execute these runner classes by Right click. However in Intellij IDEA (licensed version), even when cucumber-for-java and junit plugins are enabled in Settings window, I dont get Run option.

也在运行/调试配置窗口 -> Cucumber java -> 主类应该是什么?我的主类具有启动 Firefox 浏览器的代码,并且位于不同的子包中.

Also in Run/Debug configurations window -> Cucumber java -> what should be the main class? My main class has code to launch firefox browser and is in different subpackage.

如果我在主类中提到cucumber.cli.Main",它会给我错误 - 无法找到或加载主类cucumber.cli.Main

If i mention "cucumber.cli.Main" in Main class, it gives me error - Could not find or load main class cucumber.cli.Main

请帮忙.

谢谢,

推荐答案

前提是

也在运行/调试配置窗口中 ->黄瓜 java ->主类应该是什么?

Also in Run/Debug configurations window -> Cucumber java -> what should be the main class?

该类取自在项目中启用 Cucumber 支持时附带的 jar 档案.默认情况下,主类名称为 cucumber.cli.Main:

The class is taken from the jar archive attached when enabling Cucumber support in project. By default, the main class name is cucumber.cli.Main:

不要忘记在 Cucumber 运行/调试配置.

Do not forget to specify the package where your step definitions are stored in the Glue filed of the Cucumber Run/Debug Configuration.

这篇关于Cucumber runner 类的 Intellij IDEA 运行配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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