Extreme Programming Adventure
Extreme Programming and Unit Testing in particular is exciting because the Unit Testing
itself serves as Design & accomodates change without great effort, reducing Post production
Testing and Support time and Expense..... Amazing
I took OOAD course offered by Dr. Venkat last Semester, we were introduced to the concepts
of OOAD, Unit Testin, Design Patterns and a lot more.... Programming the professional way
The transition from Object Oriented Programming to Test Driven Development is not easy as
the humans have the tendency to resist change.... I still remember grabbing OO concepts with
my Procedural Programming Biased mind.........
So what is the approach.........
1) Write the Test first before even you write a single line of code, The Test shoild fail in
the absence of your "useful" code... sounds extreme
2) Write the minimum amount of code to make the Test Pass....
3) Write useful code and Refactor..... Simple
RED, GREEN, REFACTOR is the key to Unit Testing, Red for failing the Test, Green for writing
code to make the Test Pass and Refactor to achieve Cohesiveness
Tools:
Though you can also write your simple Unit Testing FrameWork, its not really the best thing
to do, lots of Unit Testing tools like NUnit for C# and JUnit for Java is available. Please
check out http://www.nunit.org/
http://www.junit.org
References:
The Best possible Starter Reference should be ...... http://msdn.microsoft.com/msdnmag/issues/04/04/ExtremeProgramming/default.aspx
Book References Unit Test Frameworks by Paul Hamill Pragmatic Unit Testing in C# with NUnit Unit Testing in Java with JUnit
Comments
Post a Comment