How to do Acceptance Test Driven Development with Hitch¶
See also: Behavior Driven Development.
A recommended approach to Acceptance Test Driven Development wth hitch is to do the following steps in order:
- Write a high level, failing
/glossary/acceptance_testfor an unimplemented feature or bug.
- Refactor the high level test.
- Implement the code that runs the test in the Execution Engine.
- Implement the code that makes the test pass.
- Refactor the code.
Each of these steps should be iterative and going back and changing the step or steps above it will often be necessary.
Mistakes made at the higher level often become progressively more expensive the later
Write a high level failing acceptance test¶
See How to do Behavior Driven Development with Hitch for how to get to this point.
name : Search for and buy a Fisher-Price Power Wheels Disney Frozen Jeep from the store preconditions:
database: basic-database-with-power-wheels browser: firefox
- description: |
User searches the website with firefox, finds the toy, puts it in the shopping cart, registers as a first time user and purchases.
Load the website
Search for: Power Wheels Disney Frozen Jeep
Click on Fisher-Price Power Wheels Disney Frozen Jeep
- Fill form:
Name: Barack Obama Password1: nowletmebeclear Password2: nowletmebeclear Delivery Address: 1600 Pennslyvania Ave.
- Fill form:
Credit card name: Barack Obama Credit Card Number: 1135 4913 9201 1102 9999 Three digit security code: 012 Expiry date: 01/18 Card Address: 1600 Pennslyvania Ave.
Verify that display page was displayed
- Verify that purchase order was recorded:
Name: Barack Obama Item: Power Wheels Disney Frozen Jeep