Successfully reported this slideshow.
Achieving Testing
    Nirvana
what is testing nirvana?

        you want to write tests
  know what to test, what not to test
        confidence in your ...
what is testing nirvana?




        [ stolen without permission or regard from: ]
     http://www.ayende.com/Blog/archive...
1 Unit Test
       st




    Feelings of discomfort
Strange sense of obviousness
  These symptoms will pass




[ paraphr...
1..* Unit Tests



             ↑ Comfort, Speed, Ease↑
             ↓Revisions, Confusion ↓
↑↑ Clarity, Productivity, Kno...
1 Enlightenment
          st


        congratulations, TDD status achieved!
                  Tests answer “How”
access t...
UnitTest.is_a? Documentation


                      ¿wtf?


                        ¡ftw!
     [ paraphrased from http://...
2
nd
      Enlightenment

        TDD is about Design
       Tests answer “What”
no longer want all those design tools



...
assert_false UnitTest.brittle?




               what about mocks?

     [ paraphrased from http://behavior-driven.org/In...
assert_false UnitTest.brittle?




     [ paraphrased from http://behavior-driven.org/Introduction ]
3 Enlightenment
 rd


      you are now BDD worthy
      tests are henceforth specs
 test in a framework, spec in a DSL


...
Specs.should_not be_brittle




    [ paraphrased from http://behavior-driven.org/Introduction ]
Testing
‣   *Unit test runner (JUnit, NUnit)
‣   code coverage (rcov, NCov)
‣   test augmenter (jester, pester, heckle)
‣ ...
Autometric


http://benburkert.com/assets/2007/11/9/autometric.mov
Story Tests
Story: simple addition
 As an accountant
 I want to add numbers                                     Story
 So ...
Story Tests




              #google_bar
3 boxes   {   .container
                 #search
Story Tests
Story: google's homepage
 As a gmail user
 I want visit google's homepage
 So that I can search the web or che...
Upcoming SlideShare
Loading in …5
×

Software Testing

4,519 views

Published on

This was done by Ben Burkert (benburkert.com)

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

Software Testing

  1. Achieving Testing Nirvana
  2. what is testing nirvana? you want to write tests know what to test, what not to test confidence in your code more productive writing tests before code, then just code alone
  3. what is testing nirvana? [ stolen without permission or regard from: ] http://www.ayende.com/Blog/archive/6905.aspx
  4. 1 Unit Test st Feelings of discomfort Strange sense of obviousness These symptoms will pass [ paraphrased from http://behavior-driven.org/Introduction ]
  5. 1..* Unit Tests ↑ Comfort, Speed, Ease↑ ↓Revisions, Confusion ↓ ↑↑ Clarity, Productivity, Knowledge, Confidence ↑↑ [ paraphrased from http://behavior-driven.org/Introduction ]
  6. 1 Enlightenment st congratulations, TDD status achieved! Tests answer “How” access to new tools for: testing, refactoring, automation [ paraphrased from http://behavior-driven.org/Introduction ]
  7. UnitTest.is_a? Documentation ¿wtf? ¡ftw! [ paraphrased from http://behavior-driven.org/Introduction ]
  8. 2 nd Enlightenment TDD is about Design Tests answer “What” no longer want all those design tools [ paraphrased from http://behavior-driven.org/Introduction ]
  9. assert_false UnitTest.brittle? what about mocks? [ paraphrased from http://behavior-driven.org/Introduction ]
  10. assert_false UnitTest.brittle? [ paraphrased from http://behavior-driven.org/Introduction ]
  11. 3 Enlightenment rd you are now BDD worthy tests are henceforth specs test in a framework, spec in a DSL [ paraphrased from http://behavior-driven.org/Introduction ]
  12. Specs.should_not be_brittle [ paraphrased from http://behavior-driven.org/Introduction ]
  13. Testing ‣ *Unit test runner (JUnit, NUnit) ‣ code coverage (rcov, NCov) ‣ test augmenter (jester, pester, heckle) ‣ high level testing (fit, story) Refactoring ‣ IDE plugin (anything by JetBrians) ‣ code analyzer (fxCop, flog, saikuro) ‣ Smalltalk Refactoring Browser Automation ‣ CI tools (cruisecontrol*) ‣ continuous test runner (autotest) ‣ continuous code metric (autometric)
  14. Autometric http://benburkert.com/assets/2007/11/9/autometric.mov
  15. Story Tests Story: simple addition As an accountant I want to add numbers Story So that I can count beans As a [role] Scenario: add one plus one I want to [do some action] Given an addend of 1 And an addend of 1 So that [business value] When the addends are added Then the sum should be 2 And the corks should be popped Scenario Given [initial state] Scenario: add two plus five Given an addend of 2 When [action] And an addend of 5 When the addends are added Then [result] Then the sum should be 7 [ stolen without permission or regard from: ] http://blog.davidchelimsky.net/articles/2007/10/25/plain-text-stories-part-iii http://peepcode.com/products/rspec-user-stories
  16. Story Tests #google_bar 3 boxes { .container #search
  17. Story Tests Story: google's homepage As a gmail user I want visit google's homepage So that I can search the web or check my gmail Scenario: The google bar has a link to gmail when I am logged in Given there is a gmail user ben.burkert@gmail.com And they are logged into gmail When they view the google homepage Then they should see the google_bar box And they should see the user's email_address within the google_bar box And they should see a Gmail link within the google_bar box Scenario: The search box allows the user to search the net Given there is a gmail user ben.burkert@gmail.com When they view the google homepage Then they should see a container box And they should see the search box within a container box And they should see a quot;Google Searchquot; button within the search box And they should see a quot;I'm feeling luckyquot; button within the search box

×