About TDD(Test Driven Development)

看到一点关于TDD(Test Driven Development)的精辟论述,原文如下:

Actually, writing unit test makes you think (or, design). For example, with TDD method, you can hardly write tight-coupled code, because it's difficult to write test for them. That's why I always say that TDD does not slow down your development. Without TDD, do you spend all the time on coding? Absolutely no. Still lots of time spent on thinking and designing, however you don't have an approach to record the result of thinking. TDD is something makes you think accurately, and record the result, and prove it again and again.

(实际上,做单元测试会促使你去思考或去设计.例如,使用TDD方法,你几乎不能去写一个高聚合的代码,因为去为他们写测试是很困难的事情.这就是为什么我们常常说的,TDD不会减慢你的开发速度.如果没有TDD,你会把你的全部时间都花费在写代码上吗???绝对是不可能的,你仍然会有许多时间在思考,在设计,然而,你却没有一个方法去记录你思考的结果.TDD是一个使你精准的去思考,并且可以一遍一遍的去证明你思考的结果的好东东....)

我们要测试先行!
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值