ATDD和TDD的区别是什么?

http://www.cnblogs.com/EthanCai/archive/2013/07/06/3174920.html

ATDD和TDD的区别是什么?

最近看到一个新名词“ATDD”,全称“Acceptance Test Driven Development ”,中文称“验收测试驱动开发”。ATDD和TDD的区别是什么呢,查了一些资料,我的理解如下:

先介绍一下TDD,引用Wikipedia上的关于TDD的介绍:

Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: first the developer writes an (initially failing) automated test case that defines a desired improvement or new function, then produces the minimum amount of code to pass that test, and finally refactors the new code to acceptable standards.

TDD只涉及到Developer(开发者),只能算个人工作方式的改变。而现代软件开发,往往都是“产品经理(或业务)、测试人员(或QA)、开发人员”三者合作的成果,如果开发人员对业务需求理解的不正确,那么写出的测试用例也是错的,这个问题是TDD解决不了的。中文Wikipedia上对于TDD缺点的描述,也把这一问题列在第一位:

image

ATDD又如何解决这个问题呢?《Explore It!: Reduce Risk and Increase Confidence with Exploratory Testing》这本书的作者Elisabeth Hendrickson给出了下面的解释:

Acceptance Test Driven Development (ATDD) is a practice in which the whole team collaboratively discusses acceptance criteria, with examples, and then distills them into a set of concrete acceptance tests before development begins. It’s the best way I know to ensure that we all have the same shared understanding of what it is we’re actually building. It’s also the best way I know to ensure we have a shared definition of Done.

整个团队(包括上面提到的三方成员)在开发工作开始之前,一起讨论、制定每个任务(或者用户故事)的验收标准,并提取出一组验收测试用例。这么做好处在于:

  1. 大家一起讨论验收标准和测试用例保证了对业务需求一致的理解。(这一点实际是所有开发环节中都需要关注的问题
  2. 通过形成测试用例,使标准成为可执行的内容,而不是虚的指标。

国内公司一般项目开发进度很紧,大部分公司开发和测试工作由不同的人来负责,完全照搬TDD流程来开发成本过高。我更建议开发人员使用自动化测试技术编写验收测试用例,只要验收测试用例能够跑通了,就可以提交测试。

参考:

  1. Test-driven development
  2. 测试驱动开发
  3. BDD就是做得比较好的ATDD吗?
  4. Acceptance Test Driven Development (ATDD): an Overview
  5. 验收测试驱动开发(ATDD)
  6. 【转】TDD和ATDD的转化?

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值