Test Driven Development

  • 458 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
458
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
10
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. TEST DRIVEN DEVELOPMENTSaturday, March 5, 2011
  • 2. TEST-DRIVEN DEVELOPMENT • Design • Focus / Project Management • Collaboration • Creation of TestsSaturday, March 5, 2011
  • 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. 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. UNIT TEST FRAMEWORKS • Test::Unit • Shoulda • Rspec http://github.com/ultrasaurus/test-framework-comparisonSaturday, March 5, 2011
  • 6. INTEGRATION TEST FRAMEWORKS • Cucumber • Webrat / Capybara • Selenium • Watir • And more…Saturday, March 5, 2011
  • 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. http://blazingcloud.netSaturday, March 5, 2011