问题现象
IDEA运行单元测试报错Error running 'MyTest.testException': Command line is too long. Shorten command line for MyTest.testException or also for JUnit default configuration.
解决步骤
找到项目workspace.xml
![](https://img-blog.csdnimg.cn/img_convert/511dcaa796c2519e5669c26abfff3488.png)
<property name="dynamic.classpath" value="true" />
添加
![](https://img-blog.csdnimg.cn/img_convert/09c81fa42a641dd2e94dbb6b4f9c17de.png)
![](https://img-blog.csdnimg.cn/img_convert/de2ebd3f4dc24111171c51e672d07678.png)