Squaretest
安装方法
在IDEA插件市场搜索Squaretest,点击install安装即可,如下图所示
使用
1.选择controller文件,右键选择Generate
2.选择Generate Test - Confirm Mocks
3.选择需要Mock的对象,点击ok
4.生成单元测试代码
缺点
1.收费,只有30天免费使用
2.生成的代码需要人工调整
(1)方法名不符合规范
(2)post方法不会生成对应的DTO对象
参考文档
1.官方使用文档
GitHub - SquaretestLLC/Squaretest: Tracks issues for the Squaretest plugin for IntelliJ IDEARandoop: Automatic unit test generation for Java:
最后更新时间:2021-05-04
缺点
学习成本较高,且效果不好JUnitGenerator V2.0 - plugin for IntelliJ IDEA and Android Studio | JetBrains:
最后更新时间:2015-05-06
缺点
只能生成测试代码框架,具体的测试代码需要人工写
不支持JUnit5,只支持到JUnit4
CodePro Analytix/CodePlex AnalytiX
最后更新时间:自从2011年被谷歌收购后就没有更新
缺点
只支持EclipseJUnit-Tools:
最后更新时间:2018-11-09
缺点
只支持EclipseEvoSuite | Automatic Test Suite Generation for Java
最后更新时间:2021-09-06
缺点
配置成本较高



