Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Automated Acceptance Testing

Automated Acceptance Testing

My talk on using Calabash for Automated Acceptance Testing at CocoaHeads Durham

Josh Johnson

July 29, 2012
Tweet

More Decks by Josh Johnson

Other Decks in Programming

Transcript

  1. Automated
    Acceptance Testing
    or: How I stopped worrying and
    trusted the tests
    by Josh Johnson - @jnjosh

    View full-size slide

  2. Disclaimer.
    (I haven’t always tested)

    View full-size slide

  3. So, testing...

    View full-size slide

  4. Acceptance Testing

    View full-size slide

  5. calaba.sh
    http://

    View full-size slide

  6. How does it work?

    View full-size slide

  7. As a role
    I want action
    In order to goal

    View full-size slide

  8. Given context
    When event occurs
    Then ensure outcome

    View full-size slide

  9. So, what does this look like?

    View full-size slide

  10. Feature: Cool Button View
    As a user of Cool Button App
    I want to be able to press buttons
    So I can see cool text and images

    View full-size slide

  11. Feature: Cool Button View
    As a user of Cool Button App
    I want to be able to press buttons
    So I can see cool text and images
    Scenario: Hello displays message
    Given the app is running
    When I touch "Hello"
    Then I see the text "Hello CocoaHeads!"

    View full-size slide

  12. Feature: Cool Button View
    As a user of Cool Button App
    I want to be able to press buttons
    So I can see cool text and images
    Scenario: Hello displays message
    Given the app is running
    When I touch "Hello"
    Then I see the text "Hello CocoaHeads!"
    Scenario: Cool displays image
    Given the app is running
    When I touch "Cool"
    Then I see the "hoff"

    View full-size slide

  13. Remember when I said “Device”
    testing and “Rotation”?

    View full-size slide

  14. www.lesspainful.com

    View full-size slide

  15. video courtesy lesspainful.com
    http://www.youtube.com/watch?v=fX4TLdf02L4

    View full-size slide

  16. Robots!
    * well, not exactly robots, but it is still pretty cool
    *

    View full-size slide

  17. So, How did you stop
    worrying and trust the
    tests?

    View full-size slide

  18. Use something that
    makes it easy.

    View full-size slide

  19. Make it a deliverable.

    View full-size slide

  20. Thanks!
    calaba.sh
    http://

    View full-size slide