January 2012
Intermediate to advanced
336 pages
8h 12m
English
Sometimes you have several scenarios that follow exactly the same pattern of steps, just with different input values or expected outcomes. For example, suppose we’re testing each of the fixed amount withdrawal buttons on the ATM:
| | Feature: Withdraw Fixed Amount |
| | |
| | The "Withdraw Cash" menu contains several fixed amounts to |
| | speed up transactions for users. |
| | |
| | Scenario: Withdraw fixed amount of $50 |
| | Given I have $500 in my account |
| | When I choose to withdraw the fixed amount of $50 |
| | Then I should receive $50 cash |
| | And the balance of my account should be $450 |
| | |
| | Scenario: Withdraw fixed amount of $100 |
| | Given I have $500 in my account |
| | When I choose to withdraw the fixed amount of ... |
Read now
Unlock full access