TDDTrainingCourse |
Jaideep,
I hope you do not mind me responding to 3 points in your article. My main reason for doing this is to ensure that the definition of TDD is correct.
[B]1) You say:[/B]
[I]“Along with the requirements coding, the developer has to write code for the testing of each of the logic he has built in the product.”[/I]
[B]My response:[/B]
Your comment suggests that the test is for testing code that has already been written. Actually, in TDD you create a test first. It is a way of driving the design of the code that you are about to write.
[B]2) You say:[/B]
[I]“It is more or less a unit testing where each small unit is tested individually by the developer as soon as he completes writing the code for it”[/I]
[B]My response.[/B]
No, you write a test first, and then write the smallest amount of business logic to get that test to pass.
[B]3) You say:[/B]
[I]“The extra effort done by the developer in return saves a lot of time that is required for testing later since in TDD, the bugs reduce tremendously in such a manner that once matured, the later stage testing can be totally avoided”[/I]
[B]My response.[/B]
TDD is a design technique. It is not a testing technique. Acceptance testing and QA testing MUST still be performed. However, because TDD has been used in the design of the code, it is probable that these test teams will find far fewer bugs.
Jaideepkhanduja |
Thanks. Excellent clarity drawn I would say. My replies on your respective responses are as below:
1)[B] I said:[/B]
“Along with the requirements coding, the developer has to write code for the testing of each of the logic he has built in the product.”
[B]Your response:[/B]
Your comment suggests that the test is for testing code that has already been written. Actually, in TDD you create a test first. It is a way of driving the design of the code that you are about to write.
[B]My Reply: [/B]
Agreed partially. I still understand that there will be certain test cases need to be produced after the code is completed. Or certain test cases need to be amended during the course of code writing.
2) [B]I said:[/B]
“It is more or less a unit testing where each small unit is tested individually by the developer as soon as he completes writing the code for it”
[B]Your response.[/B]
No, you write a test first, and then write the smallest amount of business logic to get that test to pass.
[B]My Reply: [/B]
I didn’t mention here about writing a test. I mentioned – testing is performed as soon as the developer completes writing the code. I am sure testing is performed only after completion of the code.
3) [B]I said:[/B]
“The extra effort done by the developer in return saves a lot of time that is required for testing later since in TDD, the bugs reduce tremendously in such a manner that once matured, the later stage testing can be totally avoided”
[B]Your response.[/B]
TDD is a design technique. It is not a testing technique. Acceptance testing and QA testing MUST still be performed. However, because TDD has been used in the design of the code, it is probable that these test teams will find far fewer bugs.
[B]My Reply:[/B]
Very true. I agree to it that TDD is a design technique and it is not a testing technique. I also accept the rest part of the response what you have said.
Thanks a ton for connecting.
Jaideepkhanduja |
One more thing: I would rather prefer calling TDD as design and testing technique rather than just design technique because it helps testing team to a large extent. Though TDD is performed by the designer and not tester.