问题记录

在这里插入图片描述

IDEA运行测试用例失败,提示Error running Xxxx. Command line is too long.,说执行命令行太长。

问题解决

修改当前项目下的.idea文件夹里的workspace.xml文件。

步骤:

  1. 在项目目录下的 .idea 目录里找到 workspace.xml 文件。
    在这里插入图片描述
  2. 打开workspace.xml文件找到<component name="PropertiesComponent">标签。
  3. <component name="PropertiesComponent">标签里面添加一行<property name="dynamic.classpath" value="true" />,保存退出并重新运行。

参考文献:
1.IDEA在运行测试类的时候报错:Error running ‘test‘: Command line is too long:https://blog.csdn.net/nbxinjian/article/details/124149401

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐