Test Driven Development presentation delhi meetup


Published on

TDD is a scrum engineering practice that helps in writing quality code and has in-built regression testing to ensure good code quality.

Published in: Software, Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Test Driven Development presentation delhi meetup

  1. 1. © 2013 iZenBridge | CONFIDENTIAL Introduction to Test Driven Development Naveen Singh, PMP, PMI-ACP, CSP, CSM Agile Coach and Trainer
  2. 2. © 2013 iZenBridge | CONFIDENTIAL Unit Testing Test Driven Development Unit testing Framework Code Sample
  3. 3. © 2013 iZenBridge | CONFIDENTIAL What is Unit Testing
  4. 4. © 2013 iZenBridge | CONFIDENTIAL Unit Test A unit test is to test one unit of work. Generally one unit means of one requirement for one method.
  5. 5. © 2013 iZenBridge | CONFIDENTIAL Unit Test Characteristics
  6. 6. © 2013 iZenBridge | CONFIDENTIAL Test Driven Development TDD was introduced long back in 1999 as part of eXtreme Programming (XP) by a group of developers. Basic philosophy is “Before you write code, think about what it will do”.
  7. 7. © 2013 iZenBridge | CONFIDENTIAL Test Driven Development Testing code once will not ensure future changes will not impact to earlier tested code so TDD is something you write once but run once, twice, three times etc. TDD is risk averse programming, investing work in the near term to avoid failures later on.
  8. 8. © 2013 iZenBridge | CONFIDENTIAL TDD Cycle Write a test Compile Fix compilat ion error Run Test Write Code Run test Refactor code
  9. 9. © 2013 iZenBridge | CONFIDENTIAL Benefits
  10. 10. © 2013 iZenBridge | CONFIDENTIAL Benefits
  11. 11. © 2013 iZenBridge | CONFIDENTIAL Misconceptions
  12. 12. © 2013 iZenBridge | CONFIDENTIAL Unit Test Framwork Before Unit Test Framework developers were using message box/new window to verify the output of code. Later on developers moved on console based testing and it was better than previous but still there was no common way of writing and executing test cases.
  13. 13. © 2013 iZenBridge | CONFIDENTIAL NUnit NUnit is the most popular unit testing framework for Microsoft .Net platform. NUnit is based on JUnit a java-based unit testing tool. NUnit is stable, easy to use, and executes quickly. NUnit is easy to learn and has become a standard tool in almost every TDD practitioner’s toolbox.
  14. 14. © 2013 iZenBridge | CONFIDENTIAL NUnit – Important links http://www.nunit.org http://nunit.org/download.html http://sourceforge.net/projects/nunit/
  15. 15. © 2013 iZenBridge | CONFIDENTIAL NUnit - Input & Output NUnit Dll, exe file XML file (Optional) Processing details on the GUI or Command prompt
  16. 16. © 2013 iZenBridge | CONFIDENTIAL NUnit - Input & Output Time to write TDD based code for given scenarios 1. Display largest value from an array 2. UserBLL class should return text in below at after login Hello Mr. Joe, Age – 39
  17. 17. © 2013 iZenBridge | CONFIDENTIAL Stay Connected YouTube Channel www.youtube.com/izenbridge PMP® / PMI-ACP® Discussion Forum forum.izenbridge.com Naveen Singh naveenhome@gmail.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.