Types of Scenarios
Workflow Scenarios
Most scenarios have three parts:Given: Set up a situation
When: Some interesting triggering event happens
Then: Verify that the system is in a new stateThe "Given" can describe either the state of the system,
or the series of steps that led to that state (or both).
When: Some interesting triggering event happens
Then: Verify that the system is in a new stateThe "Given" can describe either the state of the system,
or the series of steps that led to that state (or both).
The most basic scenarios describe
a series of actions and their effects.
Scenarios with many steps can be broken down so that we create separate scenarios, each focused on one key step.a series of actions and their effects.
Scenario: Patron checks out with low fines
Given the patron has accumulated fines of $1.99
And the patron attempts to check out a book
When the patron declines to pay
Then the patron should have checked out the book
And the patron should have accumulated fines of $1.99
(Reading...)
Formatting Hints:
To format... | use this markup: |
---|---|
source code | {source:lang=java|lineNumbers=false}...{source} (Supported languages: java, cpp, csharp, c, python.) |
bold text | __some text__ |
italicized text | ~~some text~~ |
underlined text | @@some text@@ |
a method or class name | ``myMethod(...)`` |