SlideShare a Scribd company logo
1 of 20
Как не нужно писать Gherkin
         сценарии!

           или о том, как извлечь
           максимальную пользу
            от Acceptance Tests
Andrii Dzynia
Test Engineer/Consultant/Trainer



                @adzynia




         http://adzynia.com
Клиенты
О чем будем говорить
    Что такое приемочные
            тесты?


       Что такое BDD?


    Примеры написания
    приемочных тестов
Разработка через приемочное
       тестирование
Что такое приемочный тест?


Acceptance testing is a test conducted to
determine if the requirements of a specification
or contract are met
Приемочный тест от тестировщика
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
Приемочный тест от разработчика
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
Приемочный тест от бизнес аналитика


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
“3 Amigos Meeting”




 «Начиная, представляйте конечную цель» (с) Стивен Кови
Золотая середина
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
Параметры
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 |
Таблицы
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
Регулярные выражения
@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)
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
src/test/recources/acceptance/functional-block-1/

-   Feature-1.feature
-   Feature-2.feature
-   Feature-3.feature
-   Feature-4.feature
-   Feature-5.feature
Feature 1
@done
Feature:

@UserStory1 @UserStory3
Scenario:

@Pending @UserStory2
Scenario:
Инструменты
Рекомендации
Попробуйте правило 3-х амиго
     для сложных задач

Не пишите приемочные тесты на
    работу UI компонентов

 Пишите приемочные тесты на
  бизнес логику приложения

     Делайте рефакторинг
      приемочных тестов
http://adzynia.com




   @adzynia


  me@adzynia.com

More Related Content

What's hot

Chapter 7 review questions
Chapter 7 review questionsChapter 7 review questions
Chapter 7 review questions
loayshabaneh
 

What's hot (20)

SOLID Design Principles
SOLID Design PrinciplesSOLID Design Principles
SOLID Design Principles
 
Design Patterns: From STUPID to SOLID code
Design Patterns: From STUPID to SOLID codeDesign Patterns: From STUPID to SOLID code
Design Patterns: From STUPID to SOLID code
 
Networking in java, Advanced programming
Networking in java, Advanced programmingNetworking in java, Advanced programming
Networking in java, Advanced programming
 
Spring ioc
Spring iocSpring ioc
Spring ioc
 
Testing with JUnit 5 and Spring
Testing with JUnit 5 and SpringTesting with JUnit 5 and Spring
Testing with JUnit 5 and Spring
 
JUnit 5
JUnit 5JUnit 5
JUnit 5
 
Chapter 7 review questions
Chapter 7 review questionsChapter 7 review questions
Chapter 7 review questions
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
 
Lecture 07 - Basic SQL
Lecture 07 - Basic SQLLecture 07 - Basic SQL
Lecture 07 - Basic SQL
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern Presentation
 
JUnit- A Unit Testing Framework
JUnit- A Unit Testing FrameworkJUnit- A Unit Testing Framework
JUnit- A Unit Testing Framework
 
C# - Part 1
C# - Part 1C# - Part 1
C# - Part 1
 
Core java
Core java Core java
Core java
 
Servlets
ServletsServlets
Servlets
 
An introduction to SQLAlchemy
An introduction to SQLAlchemyAn introduction to SQLAlchemy
An introduction to SQLAlchemy
 
Java oops and fundamentals
Java oops and fundamentalsJava oops and fundamentals
Java oops and fundamentals
 
Inheritance
InheritanceInheritance
Inheritance
 
C# Access modifiers
C# Access modifiersC# Access modifiers
C# Access modifiers
 
Collections and its types in C# (with examples)
Collections and its types in C# (with examples)Collections and its types in C# (with examples)
Collections and its types in C# (with examples)
 
Strings in Java
Strings in JavaStrings in Java
Strings in Java
 

Similar to Как не нужно писать Gherkin сценарии

Agile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai ShevchenkoAgile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai Shevchenko
Moldova ICT Summit
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
KMS Technology
 
Cis407 a ilab 6 web application development devry university
Cis407 a ilab 6 web application development devry universityCis407 a ilab 6 web application development devry university
Cis407 a ilab 6 web application development devry university
lhkslkdh89009
 
Cis 407 i lab 6 of 7
Cis 407 i lab 6 of 7Cis 407 i lab 6 of 7
Cis 407 i lab 6 of 7
helpido9
 
Code Camp Applying Modern Software Development Techniques To Ui Testing
Code Camp  Applying Modern Software Development Techniques To Ui TestingCode Camp  Applying Modern Software Development Techniques To Ui Testing
Code Camp Applying Modern Software Development Techniques To Ui Testing
ChristopherGTaylor
 
Qtp Training
Qtp TrainingQtp Training
Qtp Training
mehramit
 

Similar to Как не нужно писать Gherkin сценарии (20)

Agile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai ShevchenkoAgile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai Shevchenko
 
Testing the frontend
Testing the frontendTesting the frontend
Testing the frontend
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworks
 
Supercharge Your Pages - New Ways to Extend the Confluence Editor
Supercharge Your Pages - New Ways to Extend the Confluence EditorSupercharge Your Pages - New Ways to Extend the Confluence Editor
Supercharge Your Pages - New Ways to Extend the Confluence Editor
 
Working Software Over Comprehensive Documentation
Working Software Over Comprehensive DocumentationWorking Software Over Comprehensive Documentation
Working Software Over Comprehensive Documentation
 
Cis407 a ilab 6 web application development devry university
Cis407 a ilab 6 web application development devry universityCis407 a ilab 6 web application development devry university
Cis407 a ilab 6 web application development devry university
 
Cis 407 i lab 6 of 7
Cis 407 i lab 6 of 7Cis 407 i lab 6 of 7
Cis 407 i lab 6 of 7
 
Code Camp Applying Modern Software Development Techniques To Ui Testing
Code Camp  Applying Modern Software Development Techniques To Ui TestingCode Camp  Applying Modern Software Development Techniques To Ui Testing
Code Camp Applying Modern Software Development Techniques To Ui Testing
 
Functional Testing for React Native Apps
Functional Testing for React Native AppsFunctional Testing for React Native Apps
Functional Testing for React Native Apps
 
J Unit
J UnitJ Unit
J Unit
 
Protractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsProtractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applications
 
Java Web Development with Stripes
Java Web Development with StripesJava Web Development with Stripes
Java Web Development with Stripes
 
Supercharging your Organic CTR
Supercharging your Organic CTRSupercharging your Organic CTR
Supercharging your Organic CTR
 
Microsoft az-303 Dumps
Microsoft az-303 DumpsMicrosoft az-303 Dumps
Microsoft az-303 Dumps
 
Qtp Training
Qtp TrainingQtp Training
Qtp Training
 
How to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkHow to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular Framework
 
Test & behavior driven development
Test & behavior driven developmentTest & behavior driven development
Test & behavior driven development
 
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
 
Using Page Objects
Using Page ObjectsUsing Page Objects
Using Page Objects
 

More from Andrii Dzynia

What does it mean to be a test engineer?
What does it mean to be a test engineer?What does it mean to be a test engineer?
What does it mean to be a test engineer?
Andrii Dzynia
 
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAppium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriver
Andrii Dzynia
 
How to Manage Testing in Dynamic World
How to Manage Testing in Dynamic WorldHow to Manage Testing in Dynamic World
How to Manage Testing in Dynamic World
Andrii Dzynia
 
10 правил agile тестировщика IT-Brunch
10 правил agile тестировщика IT-Brunch10 правил agile тестировщика IT-Brunch
10 правил agile тестировщика IT-Brunch
Andrii Dzynia
 
Что такое Exploratory Testing?
Что такое Exploratory Testing?Что такое Exploratory Testing?
Что такое Exploratory Testing?
Andrii Dzynia
 
Software testing 2.0
Software testing 2.0Software testing 2.0
Software testing 2.0
Andrii Dzynia
 
Testing Dojo Kyiv - Testing Heuristics
Testing Dojo Kyiv - Testing HeuristicsTesting Dojo Kyiv - Testing Heuristics
Testing Dojo Kyiv - Testing Heuristics
Andrii Dzynia
 
Основы Self Management v. 2
Основы Self Management v. 2Основы Self Management v. 2
Основы Self Management v. 2
Andrii Dzynia
 

More from Andrii Dzynia (20)

Continuous Delivery as you want it
Continuous Delivery as you want itContinuous Delivery as you want it
Continuous Delivery as you want it
 
Test coaching your agile team
Test coaching your agile teamTest coaching your agile team
Test coaching your agile team
 
Testing at Spotify
Testing at SpotifyTesting at Spotify
Testing at Spotify
 
What does it mean to be a test engineer?
What does it mean to be a test engineer?What does it mean to be a test engineer?
What does it mean to be a test engineer?
 
Exploring your unit tests
Exploring your unit testsExploring your unit tests
Exploring your unit tests
 
Hermetic environment for your functional tests
Hermetic environment for your functional testsHermetic environment for your functional tests
Hermetic environment for your functional tests
 
Quality Built In @ Spotify
Quality Built In @ SpotifyQuality Built In @ Spotify
Quality Built In @ Spotify
 
Applying testing mindset to software development
Applying testing mindset to software developmentApplying testing mindset to software development
Applying testing mindset to software development
 
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAppium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriver
 
How to Manage Testing in Dynamic World
How to Manage Testing in Dynamic WorldHow to Manage Testing in Dynamic World
How to Manage Testing in Dynamic World
 
ExtJS WebDriver
ExtJS WebDriverExtJS WebDriver
ExtJS WebDriver
 
10 правил agile тестировщика IT-Brunch
10 правил agile тестировщика IT-Brunch10 правил agile тестировщика IT-Brunch
10 правил agile тестировщика IT-Brunch
 
«Самоорганизуй» себя, пока не «самоорганизовали» тебя
«Самоорганизуй» себя, пока не «самоорганизовали» тебя«Самоорганизуй» себя, пока не «самоорганизовали» тебя
«Самоорганизуй» себя, пока не «самоорганизовали» тебя
 
iOS and Android Mobile Test Automation
iOS and Android Mobile Test AutomationiOS and Android Mobile Test Automation
iOS and Android Mobile Test Automation
 
10 правил Agile тестировщика
10 правил Agile тестировщика10 правил Agile тестировщика
10 правил Agile тестировщика
 
Что такое Exploratory Testing?
Что такое Exploratory Testing?Что такое Exploratory Testing?
Что такое Exploratory Testing?
 
Software testing 2.0
Software testing 2.0Software testing 2.0
Software testing 2.0
 
Тестировщики Vs Программисты
Тестировщики Vs ПрограммистыТестировщики Vs Программисты
Тестировщики Vs Программисты
 
Testing Dojo Kyiv - Testing Heuristics
Testing Dojo Kyiv - Testing HeuristicsTesting Dojo Kyiv - Testing Heuristics
Testing Dojo Kyiv - Testing Heuristics
 
Основы Self Management v. 2
Основы Self Management v. 2Основы Self Management v. 2
Основы Self Management v. 2
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Как не нужно писать Gherkin сценарии

  • 1. Как не нужно писать Gherkin сценарии! или о том, как извлечь максимальную пользу от Acceptance Tests
  • 4. О чем будем говорить Что такое приемочные тесты? Что такое BDD? Примеры написания приемочных тестов
  • 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
  • 10. “3 Amigos Meeting” «Начиная, представляйте конечную цель» (с) Стивен Кови
  • 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
  • 16. src/test/recources/acceptance/functional-block-1/ - Feature-1.feature - Feature-2.feature - Feature-3.feature - Feature-4.feature - Feature-5.feature
  • 19. Рекомендации Попробуйте правило 3-х амиго для сложных задач Не пишите приемочные тесты на работу UI компонентов Пишите приемочные тесты на бизнес логику приложения Делайте рефакторинг приемочных тестов
  • 20. http://adzynia.com @adzynia me@adzynia.com