带有IntelliJ的黄瓜未找到步骤定义 [英] Cucumber with IntelliJ not finding step definitions

查看:156
本文介绍了带有IntelliJ的黄瓜未找到步骤定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了以下问题。我在IntelliJ中有四个Cucumber功能文件。我通过IntelliJ插件添加了Cucumber支持。创建功能后,我按如下所示编辑了配置,以便执行功能文件。

I encountered the following issue. I have four Cucumber feature files in IntelliJ. I added the Cucumber support via the IntelliJ plugin. After creating my features I edited my configuration like followed so i can execute the feature files.


胶应该是步骤定义所在的包的名称。在我的情况下,该包称为 stepdefinitions

下图显示了我的项目结构。功能文件位于 / src / test / resource / features 中,而stepdefinitions存储在 / src / test / java / stepdefinitions 中。

The following image shows what my project structure looks like. The feature files reside in /src/test/resource/features while the stepdefinitions are stored in /src/test/java/stepdefinitions.

当我尝试使用得到的步骤定义来运行Cucumber功能时,很遗憾提示您可以使用下面的代码片段执行缺少的步骤: 但是我已经做到了。我已经将这些片段复制到了步骤定义文件中。当我悬停一个场景时,IntelliJ会告诉我*未实现的子步骤定义。

Sadly when I try to run the cucumber features with the step definitions I get prompted "You can implement missing steps with the snippets below:" But I already did this. I already copied those snippets to the step definition files. When I hover a scenario IntelliJ tells me *Unimplemented Substep Definition".

有两点使我得出结论:IntelliJ找不到我的步骤定义。也许你们中的一个知道我做错了。

Those two things lead me to the conclusion that IntelliJ does not find my step definitions. Maybe one of you knows what I am doing wrong.

推荐答案

我终于找到了解决问题的方法,该错误是由名为 Substep IntelliJ Plugin 的插件引起的,您需要在IntelliJ插件部分中进行搜索,然后禁用或卸载它。

I finally found the solution to my question. The error was caused by a plugin called Substep IntelliJ Plugin. You need to search for it in the IntelliJ Plugin Section and disable or deinstall it.

这篇关于带有IntelliJ的黄瓜未找到步骤定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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