IntelliJ缩短黄瓜测试命令行 [英] IntelliJ Shorten Command Line for Cucumber Tests

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

问题描述

我在IntelliJ中遇到了运行Cucumber测试的问题。当我尝试运行某个功能或方案时,出现以下错误:

I've encountered an issue running Cucumber tests in IntelliJ. When I try to run a feature or scenario, I get the following error:

"Error running 'Feature <feature>': Command line is too long. Shorten command line for Feature: <feature> or also for Cucumber java default configuration"

我知道IntelliJ的一部分 2017.3发布,他们在运行/调试配置中添加了对缩短命令行选项的支持。但是,如果我比较默认配置,我不认为它是Cucumber Java配置的一部分,但我确实在JUnit配置中看到它。例如。

I know as part of IntelliJ's 2017.3 release, they added support for a "Shorten Command Line" option in the Run/Debug Configurations. However, if I compare the default configs, I don't see it as part of the Cucumber Java configuration, but I do see it in the JUnit configuration for example.

我没有得到其他人提到的关于动态.classpath的弹出提示,我假设是因为这个新版本。任何想法?

I don't get the popup tip that others have mentioned about the dynamic .classpath, I'm assuming because of this new release. Any ideas?

推荐答案

如果你编辑IntelliJ的workspace.xml文件来设置 dynamic.classpath 属性为true,它会起作用。

If you edit IntelliJ's workspace.xml file to set the dynamic.classpath property to true, it will work.

<component name="PropertiesComponent">
    ...
    <property name="dynamic.classpath" value="true" />
</component>

我相信IntelliJ曾经通过弹出窗口为你做这件事,但自从缩短命令行以来2017.3中的功能已添加到正常的默认运行/调试配置中,它不再是这样做的。由于Cucumber for Java是一个插件,它一定不知道在这种情况下该怎么做。

I believe IntelliJ used to do this via a popup for you, but since the "Shorten Command Line" feature in 2017.3 has been added to the normal default Run/Debug configurations, it no longer does it this way. And since Cucumber for Java is a plugin, it must not know what to do in that scenario.

希望修复此问题以添加下拉列表:
< img src =https://i.stack.imgur.com/WSKEm.pngalt =缩短命令行下拉列表>

Hopefully the issue is fixed to add the dropdown:

在这里找到一些答案: IDEA 10.5命令行太长

Found some of the answer here: IDEA 10.5 Command line is too long

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

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