单元测试的投资回报率有确凿的证据吗? [英] Is there hard evidence of the ROI of unit testing?

查看:36
本文介绍了单元测试的投资回报率有确凿的证据吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

单元测试对我来说听起来很棒,但我不确定我是否应该花时间真正学习它,除非我能说服其他人它具有重要价值.我必须说服其他程序员,更重要的是,管理中的 bean-counters,所有额外的时间花在学习测试框架、编写测试、保持更新等上.会为自己付出代价,然后是一些.

Unit testing sounds great to me, but I'm not sure I should spend any time really learning it unless I can convince others that is has significant value. I have to convince the other programmers and, more importantly, the bean-counters in management, that all the extra time spent learning the testing framework, writing tests, keeping them updated, etc.. will pay for itself, and then some.

有什么证据?有没有人真的与两个独立的团队开发相同的软件,一个使用单元测试,另一个没有,并比较结果?我对此表示怀疑.我是不是应该用在互联网上查一下,每个人都在谈论它,所以它一定是正确的做法"来证明它的合理性?

What proof is there? Has anyone actually developed the same software with two separate teams, one using unit testing and the other not, and compared the results? I doubt it. Am I just supposed to justify it with, "Look it up on the Internet, everybody's talking about it, so it must be the right thing to do"?

有什么确凿的证据可以让外行相信单元测试值得付出努力?

Where is the hard evidence that will convince the laymen that unit testing is worth the effort?

推荐答案

是的.这是一个链接,指向 NCST 的 Boby George 和 Laurie Williams 的一项研究和 Nagappan 等人的另一个.我确定还有更多.威廉姆斯博士关于测试的出版物可能为找到它们提供了一个很好的起点.

Yes. This is a link to a study by Boby George and Laurie Williams at NCST and a another by Nagappan et al. I'm sure there are more. Dr. Williams publications on testing may provide a good starting point for finding them.

上述两篇论文专门引用了 TDD,并表明采用 TDD 后初始开发时间增加了 15-35%,但预发布缺陷减少了 40-90%.如果您无法获得全文版本,我建议您使用 Google Scholar 来查看您是否可以找到公开的可用版本.

The two papers above specifically reference TDD and show 15-35% increase in initial development time after adopting TDD, but a 40-90% decrease in pre-release defects. If you can't get at the full text versions, I suggest using Google Scholar to see if you can find a publicly available version.

这篇关于单元测试的投资回报率有确凿的证据吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆