Test Driven Development

589 views
558 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
589
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Test Driven Development

  1. 1. TEST DRIVEN DEVELOPMENTSaturday, March 5, 2011
  2. 2. TEST-DRIVEN DEVELOPMENT • Design • Focus / Project Management • Collaboration • Creation of TestsSaturday, March 5, 2011
  3. 3. MOVING TO TDD • Build tests before refactoring or upgrading • Test-drive bug fixes • Write tests for anything you worry about • Continuous Integration is essential • Remove unused (untested) codeSaturday, March 5, 2011
  4. 4. RED – GREEN – REFACTOR 1. Write the test 2. Watch it fail 3. Make it pass 4. Make the code good, make sure it still passesSaturday, March 5, 2011
  5. 5. UNIT TEST FRAMEWORKS • Test::Unit • Shoulda • Rspec http://github.com/ultrasaurus/test-framework-comparisonSaturday, March 5, 2011
  6. 6. INTEGRATION TEST FRAMEWORKS • Cucumber • Webrat / Capybara • Selenium • Watir • And more…Saturday, March 5, 2011
  7. 7. OUTSIDE IN TESTING • Write an scenario with Cucumber (1) • Write a step definition • Run and Watch it fail (2) • Write a failing code example with RSpec (3) • Get the example to pass (4) • Refactor (5) • Repeat 3.1 – 3.3 until Cucumber step is passing • Repeat 2 – 3 until Cucumber scenario is passing (6) • Refactor (7)Saturday, March 5, 2011
  8. 8. http://blazingcloud.netSaturday, March 5, 2011

×