从类(jars)自动创建测试代码
我们有数千个类,但没有任何真正的单元测试覆盖率。作为特殊项目,我们的目标是为所有人增加合理的覆盖范围。一种选择是从源代码创建测试并使用 GenerateTestCases 插件与 IJ。
我正在探索其他选项来大规模创建测试。
是否可以从类文件创建测试(好吧,只是测试模板)? TestGen4J 执行此操作,但该项目似乎不活动。是否有任何工具可以帮助为数千个类创建测试。
一旦生成此类测试,我希望我们有更多动力为现有类添加更多单元测试。
We have thousands of classes without any true unit test coverage. As special project we aim to add reasonable coverage to all. One option is to create tests from sourced code and use GenerateTestCases plugin with IJ.
I am exploring other options to create tests massively..
Is it possible to create tests (okay, just test-templates) from class files? TestGen4J does this, but the project seems to be inactive. Is there any tool that could help in creating the tests for thousands of classes.
Once such tests are generated, I hope we have more momentum to add more unit tests for existing classes.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Google CodePro Analytix Eclipse 插件可以自动为您生成单元测试正在积极维护。
Google CodePro Analytix eclipse plugin can generate the unit tests automatically for you and it is actively maintained.
您也可以尝试 netbeans 工具,选择类并右键单击工具/创建 Junit Test,但其手动且丑陋的任务需要处理数千个文件
you can try netbeans tools too, select the class and right click tools/create Junit Test but its manual and ugly task to thousands files