TDD - In a Nutshell

"One Picture's  Worth Thousands Words"

 image

 Benefits( from my personal experience):
1. Development can be done much quicker. You already jot down all the test cases before writing codes. By that way, you are giving much time in thinking how to solve problem. Codes become much more standard and organized because of the brainstorming.
2. Quality of code is far better and deterministic.
3. Tests are the first class document for how your code will eventually work. Any developer/tester can go through the test cases you covered and get the idea how the system should work in different cases. J Isn’t it too cool ?
4. Easier and risk free to change the code - you just need to run the tests, you will get to know where there might be some problem. 


And so on...

 

Published Friday, April 18, 2008 2:58 PM by Adil Akhter
Filed under:

Comments

# re: TDD - In a Nutshell

Saturday, April 19, 2008 8:14 AM by Webdiyer

Is there a large image?

# re: TDD - In a Nutshell

Saturday, April 19, 2008 3:31 PM by Adil Akhter

Check out the attachment.

/Adil

# re: TDD - In a Nutshell

Wednesday, April 23, 2008 1:12 PM by Jacques Marques

Hello,

Is the "New test is Failing?" flow correct?

When the answer is no its return to "Write a Test..." and if yes its follow to "Add/Update Code".

It should not be the opposite?

Thanks,

# re: TDD - In a Nutshell

Wednesday, April 23, 2008 3:19 PM by Adil Akhter

Hi Jacques Marques,

Thanks for visiting the Blog.

Actually in TDD, the basic idea is to Add a test (actual codes might not be  there) and run the automated test and to see whether its failing. If it’s failing then write codes to make it pass. This way, incrementally, development is being done. That’s what I tried to map in the diagram.:)

One point is to be noted – If a new test is added and by itself it’s passing without changing any codes, then there might be something wrong with the unit test or that test is already covered by the code.

I hope that answer your queries.If you have any comments, please feel free to give me a buzz.

/Adil

# More on Unit Testing : TestContext

Sunday, May 04, 2008 6:24 AM by Md. Adil Akhter's Weblogs

I n Test Driven Development  as a developer we spend significant amount of time in writing unit

Leave a Comment

(required) 
(required) 
(optional)
(required)