ATDD和TDD的区别是什么?
2016-09-08 10:46
169 查看
最近看到一个新名词“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缺点的描述,也把这一问题列在第一位:
TDD又如何解决这个问题呢?《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.**
整个团队(包括上面提到的三方成员)在开发工作开始之前,一起讨论、制定每个任务(或者用户故事)的验收标准,并提取出一组验收测试用例。这么做好处在于:
大家一起讨论验收标准和测试用例保证了对业务需求一致的理解。(这一点实际是所有开发环节中都需要关注的问题)
通过形成测试用例,使标准成为可执行的内容,而不是虚的指标。
国内公司一般项目开发进度很紧,大部分公司开发和测试工作由不同的人来负责,完全照搬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缺点的描述,也把这一问题列在第一位:
TDD又如何解决这个问题呢?《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.**
整个团队(包括上面提到的三方成员)在开发工作开始之前,一起讨论、制定每个任务(或者用户故事)的验收标准,并提取出一组验收测试用例。这么做好处在于:
大家一起讨论验收标准和测试用例保证了对业务需求一致的理解。(这一点实际是所有开发环节中都需要关注的问题)
通过形成测试用例,使标准成为可执行的内容,而不是虚的指标。
国内公司一般项目开发进度很紧,大部分公司开发和测试工作由不同的人来负责,完全照搬TDD流程来开发成本过高。我更建议开发人员使用自动化测试技术编写验收测试用例,只要验收测试用例能够跑通了,就可以提交测试。
相关文章推荐
- TDD实现健壮的四则运算
- 深入理解JavaScript系列(8):S.O.L.I.D五大原则之里氏替换原则LSP
- Java软件架构师值得一试的“武功秘籍”
- TDD实例讲解
- 写可测试的代码
- 100个最受欢迎的Java基础类库
- junit面向测试编程
- Robolectric介绍
- 进入Jasmine的世界——超强Javascript测试框架
- Google Test源码解析
- 第5、6、7、8、9章测试驱动开发过程
- JUnit笔记
- SCRUM_TDD个人体验
- SCRUM_TDD个人体验
- SCRUM_TDD个人体验
- SCRUM_TDD个人体验
- SCRUM_TDD个人体验
- SCRUM_TDD个人体验
- SCRUM_TDD个人体验
- SCRUM_TDD个人体验