【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刪除。



猜您在找 IDEA啟動項目時報錯:Error running 'Application': Command line is too long. Shorten command line for Application or also for Spring Boot default configuration. idea 解決Error running ‘Test’: Command line is too long. 【springcloud】【idea】啟動服務報錯Command line is too long. Shorten command line for XXXApplication or also for Spring Boot default configuration. idea 啟動項目提示 Command line is too long. Shorten command line for Application or also for Spring Boot default configuration. idea,運行SpringBoot項目提示命令行太長:Error running 'TeasApplication': Command line is too long. Shorten command line for TeasApplication or also for Spring Boot default configuration. Error running 'JeecgSystemApplication': Command line is too long. Shorten command line for JeecgSystemApplication or also for Spring Boot default configuration. Springboot項目啟動報【Error running 'xxx': Command line is too long. Shorten command line for xxx or also for Spring Boot default configuration.】錯誤解決 成功解決 運行報錯信息:Error running xxx項目: Command line is too long. Shorten command line for xxx項目 or also for Spring Boot default configuration. java 項目啟動異常 Command line is too long. Shorten command line for xxxApplication or also for Spring Boot default configuration. idea啟動springboot項目報Error running 'ServiceStarter': Command line is too long. Shorten command line for ServiceStarter or also for Application
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM