Some scenario for example of BDD
Very specific scenario:
Scenario: Error when the password and confirm password do not match
Given I am on User Registration From
When I fill the Form fields as follow:
| Field | Value |
| Name | myusrname|
| Password| password123|
|Confirm Password | passnotmatch234|
And I click on the button “Save”
Then the error message should be “Password and Confirm password do not match”
End-to-end scenario:
Scenario: New user with unique name can be registered in the system
Given user with name “Uncle Bob” does not exists in the system
When I create a new user with name “Uncle Bob”
Then the registration should be successful
In this case, there are the following checks behind the phrase “Then the registration should be successful”:
1. Registration form was saved without errors
2. The User has received a confirmation email
3. The user had clicked on the confirm link and the email confirmation was successful
4. User logged in to the system
All those steps are implicit and hidden in the phrase “Then the registration should be successful”, because the goal of the scenario was to check that user with unique name can be registered in the system.
Comments
Post a Comment