Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
My take on this testing thing is that XP promotes one level of design (project design) while programmers take it to mean a different level (code design.)
When it is mentioned "design the tests first" - these are tests on the level of "how will we determine that the code satisfies requirement X" not "this algorithm keeps pumping out numbers that are off by 1/100... I better run the debugger and find out what's going on." Project design tests should be written first. Users and Programmers do not view requirements in the same light, so when they try and speak requirements in the same language, projects fail. Designing project-level tests first forces the Users to properly define their requirements and then forces the Programmers to translate that effectively in terms that they understand - the Users have their requirements and the Programmers have their tests - both are looking at the exact same thing in their own language. This way, the Code Design will be driven by the tests - i.e. the actual requirements, rather than what the Programmers think the requirements are. At the same time, the Users know what results they can expect, and can compare this with what they want and be satisfied that all is well. This results in projects that are done right the first time. Code design level tests must necessarily be designed/run at design/coding time - this is also the kind of testing that first jumps into programmers heads when they read about XP, and is, IMHO, why this aspect of XP is so often taken to task. ---Apsyrtes In reply to Re: Re: Re: What efforts go into a programming project? (Somewhat OT)
by apsyrtes
|
|