PluginJUnitGeneratorV2.0 was not installed: Cannot download 'http://plugins.jetbrains.com/pluginManager/?action=download&id=org.intellij.plugins.junitgen&build=IU-162.2228.15&uuid=6a6cb9f5-4107-46d7-9b1c-d8205218a73b': Software caused connection abort: recv failedjava
錯誤如圖:測試
解決辦法:ui
在提示地址上面下載JUnitGenerator V2.0,地址以下:編碼
http://plugins.jetbrains.com/pluginManager/?action=download&id=org.intellij.plugins.junitgen&build=IU-162.2228.15&uuid=6a6cb9f5-4107-46d7-9b1c-d8205218a73b.net
①下載到本地插件
②file->settting->plugins->install plugin from diskrest
找到插件所在位置 若是出現restart project 即爲成功。get
從新進入項目以後,alt+insert 便可看到junit test。it
修改自動生成測試test的路徑io
File->Settings->JUnit Generator
3.Properties選項卡里的Output Path爲測試用例生成的目錄,修改成test目錄:${SOURCEPATH}/../../test/java/${PACKAGE}/${FILENAME}
注:
若是出現編碼錯誤:
File->Settings->JUnit Generator->JUnit4
* @since <pre>$date</pre> 替換 @since <pre>$today</pre>
若是出現包名錯誤:
package test.$entry.packageName; 改成package $entry.packageName;
但願對你們有所幫助謝謝。