你真的在使用单元测试吗? [英] Are you really using unit tests?

查看:29
本文介绍了你真的在使用单元测试吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我参与了很多新旧项目,他们的一个共同点是几乎没有人使用过单元测试.我更喜欢使用它,但客户通常不准备为此付费,并假设代码可以正常工作.

I have been involved in a lot of projects, both old and new, and one thing that they have in common is that almost none of them have been using unit testing. I prefer to use it, but often the customer isn´t ready to pay for that, and suppose that the code just works as it should.

那么,您是在项目中使用单元测试,还是依赖您的编码技能?

So, do you use unit testing in your projects, or do you rely on your coding skills?

推荐答案

使用单元测试一种编码技能.

Using unit-testing is a coding skill.

我发现它为编码时间增加了很少的开销.最重要的是,生成的代码往往更容易理解和重构,维护时间也大大减少.

I find it adds very little overhead to coding time. On top of that the code produced tends to be much easier to understand and to refactor, with an untold reduction in maintenance time.

此处对好处的全面讨论:单元测试值得付出努力吗?

A full discussion of the benefits here: Is Unit Testing worth the effort?

这篇关于你真的在使用单元测试吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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