This document discusses best practices for writing Gherkin scenarios for acceptance tests, including: focusing scenarios on business logic rather than UI components, using examples tables to define parameters, and structuring scenarios to map to specific user stories and functional areas using a functionality matrix. It also recommends holding "3 Amigos" meetings with business analysts and developers to refine scenarios.
6. Что такое приемочный тест?
Acceptance testing is a test conducted to
determine if the requirements of a specification
or contract are met
7. Приемочный тест от тестировщика
Given scrum master open main page
And click Backlog link
Then he should see a list of user stories
When he clicks on “Add New” link
Then he should see Add Story form
When he types “US-309 Create new user” under user story
name field
And he types “Description-Test” under user story description
field
And he types …..
And click submit button
Then message “User Story added” should be present
8. Приемочный тест от разработчика
Given “scrum master” open “main” page
And click “Backlog” link
Then should see an “empty” list of user stories
When click “Add New” link
Then should see “Add Story” form
When he types “US-309 Create new user” under “storyName”
field
And type “Description-Test” under “storyDescription” field
And type …..
And click “submit” button
Then message “User Story added” should be present
9. Приемочный тест от бизнес аналитика
Given I am scrum master
When I am adding new user story into product
backlog
Then I should have an ability to manage all user
stories
11. Золотая середина
Given a Scrum Master wants to add new user
story to product backlog
When adding new user story into product
backlog with name “US-309 Create new user”
and description “Description-Test”
Then system should show “User Story added”
message
12. Параметры
Given a Scrum Master wants to add new user story to
product backlog
When adding new user story into product backlog with
name <storyName> and description <storyDescription>
Then system should show “User Story added” message
Examples:
| storyName | storyDescription |
| US-309 Create new user | Description-Test |
| US-310 Edit user | Full Description |
13. Таблицы
Given a Scrum Master wants to add new user
story to product backlog
When adding new user story into product backlog
with data
| storyName | storyDescription |
| US-309 Create new user | Description-Test |
| US-310 Edit user | Full Description |
Then system should show “User Story added”
message
14. Регулярные выражения
@Given(“^a Scrum Master wants to add new user story to product backlog$”)
public void aScrumMasterWantsToAddUserStory()
@When(“^adding new user story into product backlog with name ”(.*)” and
description ”(.*)” $”)
public void addNewUserStoryIntoProductBacklog(List<String> list)
@When(“^adding new user story into product backlog with data”)
public void addNewUserStoryIntoProductBacklog(List<UserStory> list)
@Then(“^system should show ”(.*)” message”)
public void systemShouldShowMessage(String message)
15. Functionality Matrix
Functional Block 1
Feature Feature Feature Feature Feature
1 2 3 4 5
User Story 1 X
User Story 2 X
Epic 1 User Story 3 X
User Story 4 X
Epic 2 User Story 5 X X
19. Рекомендации
Попробуйте правило 3-х амиго
для сложных задач
Не пишите приемочные тесты на
работу UI компонентов
Пишите приемочные тесты на
бизнес логику приложения
Делайте рефакторинг
приемочных тестов