Intellj idea 安装JUnit

1、file-Settings-Plugins-Browse repositories-HTTP Proxy Settings将No proxy改成Auto-detect proxy settings

2、在plugins里搜索JUnitGenerator V2.0-右键安装

3、settings-Properties选项卡里的Output Path为测试用例生成的目录,修改为test目录:${SOURCEPATH}/../../test/java/${PACKAGE}/${FILENAME} 4.切换到JUnit 4选项卡,可以修改生成测试用例的模板,比如类名、包名等

4、IDEA自带的JUnit插件和JUnitGeneratorV2.0插件都要勾选上,若只勾选JUnit可能导致无法自动生成测试文件,若只勾选JUnitGenerator V2.0可能导致生成的测试文件无法运行

posted @ 2016-12-05 17:11  独爱竹  阅读(5015)  评论(0编辑  收藏  举报