junit4何时会被弃用?

发布于 2025-01-30 18:37:35 字数 231 浏览 4 评论 0原文

由于Junit5在那里,Junit4将得到多长时间的支持?有任何折旧计划,什么时候会?我们只是在试图衡量是否需要在某个时候或以后将现有的Junit4测试用例迁移到JUNIT5。用户指南说了以下内容,但想更清楚地知道多长时间(从现在起两年或两年)?感谢您的回复。

由于Junit团队将继续为Junit 4.x基线提供维护和错误修复版本,因此开发人员有足够的时间按照自己的时间表迁移到Junit Jupiter。

Since junit5 out there, how long jUnit4 going to be supported? Any plans for deprecation, when is it going to be? We are just trying to gauge whether we need to migrate existing jUnit4 test cases to jUnit5 now or later at some point. The user guide says the following but wanted know more clearly how long (a year, two or more from now)? Appreciate your response.

"since the JUnit team will continue to provide maintenance and bug fix releases for the JUnit 4.x baseline, developers have plenty of time to migrate to JUnit Jupiter on their own schedule."

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

独孤求败 2025-02-06 18:37:35

Junit 4十年来没有任何功能性升级。 Junit团队所做的是维护Junit 4发动机,称为Vintage,该发动机在Junit 5平台上运行Junit 4。只要平台引擎API保持向下兼容,这很可能会起作用。可能打破Junit 4的两个事件是:

  1. 平台以高度不兼容的方式变化,而复古引擎将不再支持。在不久的将来,这不是预期的。
  2. Java以不兼容的方式更改,因此原始的Junit 4代码不再起作用。我也看不到那迫在眉睫。

也就是说,仅使用Junit 4使您摆脱Java测试自动化领域的所有创新。许多扩展已经不再支持Junit 4。我的建议:立即使用Vintage立即使用该平台。用木星和您需要的其他测试引擎编写所有新测试。无论如何,当您必须对其进行调整时,迁移Old Junit 4测试。

JUnit 4 hasn’t seen any functional upgrade in a decade. What the JUnit team does is maintain the JUnit 4 engine, called Vintage, which runs JUnit 4 on the JUnit 5 platform. As long as the platform engine API stays downwards compatible this is very likely to work. The two events that could break JUnit 4 are:

  1. The platform changes in a highly incompatible way and the Vintage engine will no longer be supported. This is not to be expected in the near future.
  2. Java changes in an incompatible way so that the original JUnit 4 code no longer works. I don’t see that looming either.

That said, using just JUnit 4 decouples you from all innovation in the field of Java test automation. Many extensions already do not support JUnit 4 anymore. My recommendation: Start using the platform at once using Vintage. Write all new tests with Jupiter and the other test engines you need. Migrate old JUnit 4 tests when you have to adapt them anyway.

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