Deprecated: Assigning the return value of new by reference is deprecated in /home/techmasa/public_html/wp-content/plugins/sem-cosmos-link/sem-cosmos-link.php on line 90

Deprecated: Assigning the return value of new by reference is deprecated in /home/techmasa/public_html/wp-content/plugins/sem-recent-posts.php on line 942

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/techmasa/public_html/wp-content/plugins/sem-cosmos-link/sem-cosmos-link.php:90) in /home/techmasa/public_html/wp-content/plugins/wordpress-automatic-upgrade/wordpress-automatic-upgrade.php on line 121

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/techmasa/public_html/wp-content/plugins/sem-cosmos-link/sem-cosmos-link.php:90) in /home/techmasa/public_html/wp-content/plugins/wordpress-automatic-upgrade/wordpress-automatic-upgrade.php on line 121
TechMasala - Technology Spice Rack » 2006 » May » 29

Archive for May 29, 2006

Foundation Stone #9 - Get test infected.

A friend of mine who is an agile and extreme programming evangelist used to tell me that developers should get test infected and spread that infection. What he meant by that was that developers should subconsciously follow test driven development (TDD). Test Driven Development is a concept, a practice that says write the test code before writing the actual code. TDD does not belong to any particular development methodology and is just a best practice for developers.

Frameworks like JUnit help creating test code that can automate unit testing. Generally the unit testing code is written after the first version of code is built. What TDD preaches is to write the unit test code first assuming an operational system is available. Definitely the test code will fail because the code needed is missing. So fix the actual code what has been reported as error from the unit test result. Run the unit test again and see if it fails. If it fails write the code that will fix it. Keep doing this until the unit test passes. Basically here the test code is created first and the actual code is built with the execution results of the unit test. The advantage of using a TDD is it can drive the design of the program step by step. It helps the developer to think about the test cases before even the code is ready, this will help him/her think not just the happy path testing but also negative/failure tests. It also helps in catching bugs early on. It would look like TDD would take additional development effort but actually it saves in the long run because of reduced rework and great reduction of bugs cropping up when the QA team tests the system. TDD is like an addiction if followed as a discipline. Once addicted its difficult to get out of it as one would really enjoy the benefits of it.


Deprecated: Function ereg_replace() is deprecated in /home/techmasa/public_html/wp-content/plugins/sociable/sociable.php on line 64
Blink this Foundation Stone #9 - Get test infected. at blinklist.com    Bookmark Foundation Stone #9 - Get test infected. at blogmarks    Bookmark Foundation Stone #9 - Get test infected. at del.icio.us    Digg Foundation Stone #9 - Get test infected. at Digg.com    Fark Foundation Stone #9 - Get test infected. at Fark.com    Bookmark Foundation Stone #9 - Get test infected. at Furl.net    Bookmark Foundation Stone #9 - Get test infected. at NewsVine    Bookmark Foundation Stone #9 - Get test infected. at reddit.com    Bookmark Foundation Stone #9 - Get test infected. at Simpy.com    Bookmark Foundation Stone #9 - Get test infected. at Spurl.net    Bookmark Foundation Stone #9 - Get test infected. with wists    Bookmark Foundation Stone #9 - Get test infected. at YahooMyWeb

Comments      Cosmos


Creative Commons License  This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.