the first day of studying agile principles

结对编程与测试驱动开发
本文介绍结对编程的概念及实践方式,并深入探讨测试驱动开发(TDD)的三大规则:只允许编写使失败单元测试通过的产品代码;单元测试仅编写到足以失败的程度;产品代码仅需足够通过单一失败单元测试。

结对编程Pair Programming)是一种敏捷软件开发实践,指两个程序员并排坐在一台电脑前,面对同一个显示器,使用同一个键盘和鼠标一起工作.

 

the test-driven development

the three rules of TDD:

1. You are not allowed to write any production code unless it is to make a failing unit test pass.

在写完“红色”(无法通过测试)的单元测试代码之前,不允许写任何的产品代码。

2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.

除了恰好让单元测试失败的代码(编译错误也是错误的一种),不要写更多的单元测试。

3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test.

所写产品代码应该刚刚能够满足单元测试。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值