从类(jars)自动创建测试代码

发布于 2024-12-22 04:14:34 字数 410 浏览 3 评论 0原文

我们有数千个类,但没有任何真正的单元测试覆盖率。作为特殊项目,我们的目标是为所有人增加合理的覆盖范围。一种选择是从源代码创建测试并使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我一直都在从未离去 2024-12-29 04:14:34

Google CodePro Analytix Eclipse 插件可以自动为您生成单元测试正在积极维护。

Google CodePro Analytix eclipse plugin can generate the unit tests automatically for you and it is actively maintained.

乖乖兔^ω^ 2024-12-29 04:14:34

您也可以尝试 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文