0
Test-Driven Development <ul><li>What is Test-Driven Development? </li></ul><ul><li>Origins of TDD </li></ul><ul><li>Clean ...
Why TDD ? <ul><li>Much less time needed to debug </li></ul><ul><li>Code proven to meet requirements </li></ul><ul><li>Quic...
Mechanics of TDD <ul><li>Start with a failing test </li></ul><ul><li>Write the simplest code needed to pass the test </li>...
What should be tested? <ul><li>Valid inputs </li></ul><ul><li>Invalid inputs </li></ul><ul><li>Errors, exceptions, and eve...
TDD as a Design Technique <ul><li>Design only what you need to make the test pass </li></ul><ul><li>Requirements drive the...
Fixing Bugs – TDD Style <ul><li>Go after the most painful defect </li></ul><ul><li>Write a test to expose it </li></ul><ul...
TDD Benefits for Business <ul><li>Shorter development cycles </li></ul><ul><li>Near zero defects </li></ul><ul><li>Tests b...
<ul><li>Get some training </li></ul><ul><li>Start with a small visible project </li></ul><ul><li>Shoot for 100% test cover...
Test-Driven Development TDD Demonstration
Upcoming SlideShare
Loading in...5
×

Test Driven Development by Sameer Arora

848

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
848
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Test Driven Development by Sameer Arora"

  1. 1. Test-Driven Development <ul><li>What is Test-Driven Development? </li></ul><ul><li>Origins of TDD </li></ul><ul><li>Clean code with no defects </li></ul><ul><li>TDD in conjunction with Agile </li></ul>
  2. 2. Why TDD ? <ul><li>Much less time needed to debug </li></ul><ul><li>Code proven to meet requirements </li></ul><ul><li>Quick feedback at each step </li></ul><ul><li>Rhythm of Success </li></ul>
  3. 3. Mechanics of TDD <ul><li>Start with a failing test </li></ul><ul><li>Write the simplest code needed to pass the test </li></ul><ul><li>Remove duplication ( Refactor ) </li></ul><ul><li>Repeat as needed to meet requirements </li></ul>RED GREEN REFACTOR
  4. 4. What should be tested? <ul><li>Valid inputs </li></ul><ul><li>Invalid inputs </li></ul><ul><li>Errors, exceptions, and events </li></ul><ul><li>Boundary conditions </li></ul><ul><li>Everything that could possibly break! </li></ul>
  5. 5. TDD as a Design Technique <ul><li>Design only what you need to make the test pass </li></ul><ul><li>Requirements drive the design of code </li></ul><ul><li>Design evolves with time </li></ul>
  6. 6. Fixing Bugs – TDD Style <ul><li>Go after the most painful defect </li></ul><ul><li>Write a test to expose it </li></ul><ul><li>Write code needed to fix it </li></ul><ul><li>Refactor </li></ul><ul><li>Measure the results </li></ul>
  7. 7. TDD Benefits for Business <ul><li>Shorter development cycles </li></ul><ul><li>Near zero defects </li></ul><ul><li>Tests become an asset </li></ul><ul><li>Tests are documentation </li></ul><ul><li>Competitive advantage! </li></ul>
  8. 8. <ul><li>Get some training </li></ul><ul><li>Start with a small visible project </li></ul><ul><li>Shoot for 100% test coverage </li></ul><ul><li>Don’t expect to be perfect </li></ul><ul><li>Expect to improve dramatically in time </li></ul><ul><li>Measure the results </li></ul>Getting started with TDD
  9. 9. Test-Driven Development TDD Demonstration
  1. A particular slide catching your eye?

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

×