【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line ...

idea启动测试类报错

Error running 'Test1.test': Command line is too long. Shorten command line for Test1.test or also for JUnit default configuration.

【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line ..._第1张图片

 

注意:

最简单的方法,就是你重新创建一个新的测试类,在里面重新写一遍测试方法,代码都可以粘贴过去。

 

 

解决方法:

1.打开本项目的.idea文件夹,找到文件夹中的workspace.xml文件

【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line ..._第2张图片

 

2.搜索 

PropertiesComponent

【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line ..._第3张图片

 

3.在这个父级结构中添加

"dynamic.classpath" value="true" />

【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line ..._第4张图片

 

 4.保存以后 右键测试方法,查看效果,如果依旧有 问题,则设置

【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line ..._第5张图片

 

5.效果如下

【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line ..._第6张图片

 

你可能感兴趣的:(【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line ...)