http://citconf.com/amsterdam2008/ User Acceptance Testing Driven by Humans telling Stories  (with RSpec) Jean-Michel Garni...
 
QA Biz Analyst Ruby on Rails web app $sel.click('foo') wait_for('x$%¬') The user wants something for sure  but I have no c...
Rspec runs “plain text” Stories Story: Logging in As an anonymous user  I want to login  So that I can ... Scenario: 1.  W...
Dan North Story format <ul><ul><li>Login feature </li></ul></ul><ul><ul><ul><li>As an   anonymous user with an account </l...
Scenarios:  Acceptance Criteria <ul><ul><li>Scenario 1:   User inputs an invalid password </li></ul></ul><ul><ul><li>Given...
GIVEN: context, pre-conditions <ul><ul><ul><li>Scenario 1:   User inputs an invalid password </li></ul></ul></ul><ul><ul><...
WHEN: event, action <ul><ul><ul><li>Scenario 1:   User inputs an invalid password </li></ul></ul></ul><ul><ul><ul><li>Give...
THEN: outcome, post conditions <ul><ul><ul><li>Scenario 1:   User inputs an invalid password </li></ul></ul></ul><ul><ul><...
RSpec <ul><li>BDD Framework written in </li></ul><ul><li>also works on  </li></ul>
Binding plain text / RSpec Given   she goes to the page  ' /login '
More binding
Write your own DSL <ul><li>GIVEN .. </li></ul><ul><li>WHEN .. </li></ul><ul><li>THEN .. </li></ul>
Demo
Philippe Hanrigou reports
Cucumber by Aslak Hellesøy <ul><li>http://github.com/aslakhellesoy/cucumber/ </li></ul><ul><li>Rewrite of story runner </l...
Upcoming SlideShare
Loading in …5
×

User Acceptance Testing Driven by Humans telling Stories (with RSpec)

3,169 views

Published on

my slides from http://citconf.com/amsterdam2008/ presentation

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,169
On SlideShare
0
From Embeds
0
Number of Embeds
38
Actions
Shares
0
Downloads
94
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

User Acceptance Testing Driven by Humans telling Stories (with RSpec)

  1. 1. http://citconf.com/amsterdam2008/ User Acceptance Testing Driven by Humans telling Stories (with RSpec) Jean-Michel Garnier | 21croissants.com
  2. 3. QA Biz Analyst Ruby on Rails web app $sel.click('foo') wait_for('x$%¬') The user wants something for sure but I have no clue if developpers can implement it or not... User story As a User I want ... Scenario 1 Scenario 2 end user developper
  3. 4. Rspec runs “plain text” Stories Story: Logging in As an anonymous user I want to login So that I can ... Scenario: 1. When she goes to the page '/login' ... same jargon! end user developper
  4. 5. Dan North Story format <ul><ul><li>Login feature </li></ul></ul><ul><ul><ul><li>As an anonymous user with an account </li></ul></ul></ul><ul><ul><ul><li>I want to login to the application </li></ul></ul></ul><ul><ul><ul><li>So that I can access my personal data </li></ul></ul></ul>
  5. 6. Scenarios: Acceptance Criteria <ul><ul><li>Scenario 1: User inputs an invalid password </li></ul></ul><ul><ul><li>Given she goes to the page '/login' </li></ul></ul><ul><ul><li>When she fills in 'login' with 'stéphanie@pouet.fr' </li></ul></ul><ul><ul><li>When she fills in 'password' with 'testtest' </li></ul></ul><ul><ul><li>When she clicks the 'Log in' button </li></ul></ul><ul><ul><li>Then she should see the error message 'Couldn't log you' </li></ul></ul><ul><ul><li>Scenario 2: User inputs an invalid email </li></ul></ul><ul><ul><li>... </li></ul></ul>
  6. 7. GIVEN: context, pre-conditions <ul><ul><ul><li>Scenario 1: User inputs an invalid password </li></ul></ul></ul><ul><ul><ul><li>Given she goes to the page '/login' </li></ul></ul></ul><ul><ul><ul><li>When she fills in 'login' with 'stéphanie@pouet.fr' </li></ul></ul></ul><ul><ul><ul><li>When she fills in 'password' with 'testtest' </li></ul></ul></ul><ul><ul><ul><li>When she clicks the 'Log in' button </li></ul></ul></ul><ul><ul><ul><li>Then she should see the error message 'Couldn't log you' </li></ul></ul></ul>
  7. 8. WHEN: event, action <ul><ul><ul><li>Scenario 1: User inputs an invalid password </li></ul></ul></ul><ul><ul><ul><li>Given she goes to the page '/login' </li></ul></ul></ul><ul><ul><ul><li>When she fills in 'login' with 'stéphanie@pouet.fr' </li></ul></ul></ul><ul><ul><ul><li>When she fills in 'password' with 'testtest' </li></ul></ul></ul><ul><ul><ul><li>When she clicks the 'Log in' button </li></ul></ul></ul><ul><ul><ul><li>Then she should see the error message 'Couldn't log you' </li></ul></ul></ul>
  8. 9. THEN: outcome, post conditions <ul><ul><ul><li>Scenario 1: User inputs an invalid password </li></ul></ul></ul><ul><ul><ul><li>Given she goes to the page '/login' </li></ul></ul></ul><ul><ul><ul><li>When she fills in 'login' with 'stéphanie@pouet.fr' </li></ul></ul></ul><ul><ul><ul><li>When she fills in 'password' with 'testtest' </li></ul></ul></ul><ul><ul><ul><li>When she clicks the 'Log in' button </li></ul></ul></ul><ul><ul><ul><li>Then she should see the error message 'Couldn't log you' </li></ul></ul></ul>
  9. 10. RSpec <ul><li>BDD Framework written in </li></ul><ul><li>also works on </li></ul>
  10. 11. Binding plain text / RSpec Given she goes to the page ' /login '
  11. 12. More binding
  12. 13. Write your own DSL <ul><li>GIVEN .. </li></ul><ul><li>WHEN .. </li></ul><ul><li>THEN .. </li></ul>
  13. 14. Demo
  14. 15. Philippe Hanrigou reports
  15. 16. Cucumber by Aslak Hellesøy <ul><li>http://github.com/aslakhellesoy/cucumber/ </li></ul><ul><li>Rewrite of story runner </li></ul><ul><li>more user friendly </li></ul><ul><li>inspired by FITNESS </li></ul>

×