【IntellJ IDEA】idea啟動測試類報錯Error running 'Test1.test': Command line is too long. Shorten command line for Test1.test or also for JUnit default configuration.


idea啟動測試類報錯

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

 

注意:

最簡單的方法,就是你重新創建一個新的測試類,在里面重新寫一遍測試方法,代碼都可以粘貼過去。

 

 

解決方法:

1.打開本項目的.idea文件夾,找到文件夾中的workspace.xml文件

 

2.搜索 

PropertiesComponent

 

3.在這個父級結構中添加

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

 

 4.保存以后 右鍵測試方法,查看效果,如果依舊有 問題,則設置

 

5.效果如下

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM