» 您尚未 登录   注册 | 社区服务 | FTP中心 | 帮助 | 社区 | 无图版 | 测试百科  | 测试Blog 
软件测试基地论坛 -> 日积月累 -> I HATE saying TDD is "not about the testing".
 XML   RSS 2.0   WAP 

--> 本页主题: I HATE saying TDD is "not about the testing". 加为IE收藏 | 收藏主题 | 上一主题 | 下一主题
Fastpoint


该用户目前不在线
级别: 总版主
精华: 44
发帖: 5033
基地声望: 390 点
基地币: 1656 Bug
基地贡献: 0 点
好评度: 15 点
在线时间:818(小时)
注册时间:2005-10-08
最后登录:2008-07-22
查看作者资料 发送短消息 推荐此帖 引用回复这个帖子

I HATE saying TDD is "not about the testing".

BDD

Check out Dave Astel's paper (pdf) on TDD/BDD. Quotes:

[...] There are a score of books available on TDD, mine even won a Jolt award. So it seems that everything is rosy? Everyone who's doing TDD is fully understanding it and getting the full benefit, right?

Fat Chance!

Too few people I talk to really understand what it's really about. That means that many people who practice TDD are not getting the full benefit from it. What's wrong?

The focus on testing

Well... one thing is that people think it's about testing. That's just not the case.

Sure, there are similarities, and you end up with a nice low level regression suite... but those are coincidental or happy side effects. So why have things come to this unhappy state of affairs? Why do so many not get it?[...]

So with people thinking about testing, it's easy to come up with all sorts of negative reactions and reasons not to do it... especially when time gets short and the pressure's on.

By the way, I HATE saying TDD is "not about the testing". I have to say it now and then because of people not realizing it's about designing, rather than testing. The fact that the word "test" is in the name just helps confuse the issue. My preference for naming this design technique, is to call it "Behavior Driven Design". Or "Behavior-Spec Driven Design". With BSDD, I could say BSDD is about the behavior-specs, but mostly about driving design.

Alistair Cockburn's "Executable Example Driven Design" (XXDD) is OK, but a bit long-winded. And I don't want to have say "Dos-equis Driven Design is not about beer." :-)

The problem is mental frameworks. People reject ideas that don't fit into their mental framework. You say "test" and the listener's mental framework comes up with these and other assumptions:

  • Testing can be done manually.
  • I can do implementing, someone else can do testing.
  • Testing looks for bugs.
  • Tests need something to test.
  • Testing is hard.
  • We can skip testing if we are good enough programmers, or time is short.

None of those assumptions directly applies to TDD. TDD can't be separated into tests written by one person and code written by another because the TDD cycle of test-code-refactor is a design process that one person (or a pair) goes through in cycles, where each cycle takes only minutes. TDD/BDD helps me find bugs, but that's not the purpose of TDD. TDD isn't TDD is you do the "test" part manually.

If you say "Test-Driven Development is not about the tests," that usually doesn't provide the zen-like kick in the brain-pan that the speaker intends. Instead, the phrase gets rejected because it doesn't fit into the listener's mental framework for "tests". The listener probably thinks you're nuts. He or she might just flip the "bozo bit" and stop listening to you.

If instead you say "Behavior Spec", the listener's mental framework will have fewer contradictory assumptions. For example:

  • Specs are written before coding.
  • Specs can provide examples.
  • Specs tell you what you need to implement.
  • Someone else can write specs and I can write the code.

Not all of those assumptions are true for BDD, but there are fewer contradictions to this idea of BBD that you're trying to introduce into someone's mental framework. Behavior Specs are written before the code exists (though only minutes before). Behavior Specs are executable examples. Behavior Specs tell you, more or less, what you need to implement next. There is still the contradictory idea that someone can write the Spec and you can write the code, but that isn't as difficult to overcome as all the other assumptions that come up with the word "test".



可不可不要这么样徘徊在目光内
你会察觉到我根本寂寞难耐
即使千多百个深夜曾在梦境内
我有吻过你这毕竟并没存在

人声车声开始消和逝
无声挣扎有个情感奴隶
是我多么的想她
但我偏偏只得无尽叹谓

其实每次见你我也着迷
无奈你我各有角色范围
就算在寂寞梦内超出好友关系
唯在暗里爱你暗里着迷
无谓要你惹上各种问题
共我道别吧别让空虚使我越轨
[楼 主] | Posted: 2006-08-23 20:11 顶端
李明


该用户目前不在线
级别: Cntesting老学员
精华: 0
发帖: 186
基地声望: 15 点
基地币: 114 Bug
基地贡献: 0 点
好评度: 0 点
在线时间:189(小时)
注册时间:2006-07-10
最后登录:2006-12-02
查看作者资料 发送短消息 推荐此帖 引用回复这个帖子



well,from this text I've learnt about what is
"TDD","BDD" and "XXDD".
thank u sir!
u r so great!
and i'm so fortunate!


3个臭皮匠顶个诸葛亮.同志们让我们团结起来吧!
QQ:602472232
msn:shanghaikidxxx@hotmail.com

[1 楼] | Posted: 2006-09-23 00:15 顶端
画扇抡箭




该用户目前不在线
级别: 测试新手
精华: 0
发帖: 28
基地声望: 3 点
基地币: 6352 Bug
基地贡献: 0 点
好评度: 0 点
在线时间:16(小时)
注册时间:2006-12-30
最后登录:2007-03-28
查看作者资料 发送短消息 推荐此帖 引用回复这个帖子



My English is very poor. I don't konw what you saying.

55555 I'm a foolish man.

[2 楼] | Posted: 2006-12-30 17:25 顶端

软件测试基地论坛 -> 日积月累




软件测试基地上海测仕信息技术有限公司旗下网站
Copyright © 2005-2007 Cntesting.com, All Rights Reserved
沪ICP备06057721号

Powered by PHPWind Code © 2003-06 PHPWind
Total 0.118344(s) query 5, Time now is:08-22 04:04, Gzip disabled
You can contact us


每日一句:Loading...