[英]Is there a performance difference between JUnit3 and JUnit4?
I would like to know if there is a difference in running a JUnit3-Test or a JUnit4-Test. 我想知道在运行JUnit3-Test或JUnit4-Test中是否有区别。 Even if it is just 5-10% improvment on the total runtime, in a big project with nightly builds this could matter.
即使总运行时间仅提高了5-10%,在一个每晚进行构建的大型项目中,这也很重要。
Subquestins are: 子任务是:
@annotation
in JUnit4 style? @annotation
在JUnit4的风格? If possible please answer with references. 如果可能,请提供参考答案。
I suspect that given what JUnit does (mainly provide a framework for people to write tests), that the differences, if any, are negligible. 我怀疑,鉴于JUnit所做的事情(主要是为人们提供编写测试的框架),这些差异(如果有的话)可以忽略不计。 As with most performance issues and queries, you should probably perform measurements yourself for your particular scenario.
与大多数性能问题和查询一样,您可能应该针对特定情况自己进行测量。
Any test performance issues I've seen in the past relate to how the developers write the actual tests , and whether they handle issues like: 我过去遇到的任何测试性能问题都与开发人员如何编写实际测试以及他们是否处理以下问题有关:
If you're really concerned with test framework speed, then perhaps you should also evaluate TestNG ? 如果您真的关心测试框架的速度,那么也许您还应该评估TestNG ?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.