際際滷

際際滷Share a Scribd company logo
SPECFLOW & BDD
OLEG ZAREVYCH
- Automation QA @ Ciklum
- At least 4 years experience in QA
- 1 year working with SpecFlow
WHAT IS BDD ?


BDD IS A SECOND-GENERATION, OUTSIDEIN, PULL-
BASED, MULTIPLE-STAKEHOLDER, MULTIPLE-SCALE,
HIGH-AUTOMATION, AGILE METHODOLOGY. IT
DESCRIBES A CYCLE OF INTERACTIONS WITH WELL-
DEFINED OUTPUTS, RESULTING IN THE DELIVERY OF
WORKING, TESTED SOFTWARE THAT MATTERS.
Dan North
BEHAVIOR-DRIVEN DEVELOPMENT
- Based on TDD approach
- Driven by business value
- Collaborate technical and non-technical
stakeholders
- Acceptance criteria and users tory defined in
natural language in feature file
Business
 Domain
driven
design
Technology
 Test driven
development
TOOLS FOR BDD
- Java : jbehave, Cucumber
- Python : Behave
- Ruby : RSpec
- PHP : Behat
- JS : CucumberJS
- C# : SpecFlow
SPECFLOW
WHY ?
 Reusable
 Regex based
 Human Language support
 Cross-framework
 Describe behavior in understandable way
GHERKIN LANGUAGE
 As a [X]
I want [Y]
so that [Z]
Given some initial context (the givens),
When an event occurs,
then ensure some outcomes.
TEMPLATES
 Scenario: Google.Failed Registration first users
 Given the browser with 'https://accounts.google.com/SignUp'
is started
 When the element 'Name', 'LastName', 'Login' is filled
 | Name | LastName | Login |
 | Oleg1 | Z1 | Oleg1Z1 |
 When the element 'SignUpSubmitButton' is clicked
 Then the element 'SignUpPasswordValidationError' is present
 Scenario: Google.Failed Registration second users
 Given the browser with 'https://accounts.google.com/SignUp'
is started
 When the element 'Name', 'LastName', 'Login' is filled
 | Name | LastName | Login |
 | Oleg1 | Z1 | Oleg1Z1 |
 When the element 'SignUpSubmitButton' is clicked
 Then the element 'SignUpPasswordValidationError' is present
 Scenario Outline: Google search2x
 Given the browser with
'https://accounts.google.com/SignUp' is started
 When the element <Name>, <LastName>, <Login> is filled
 When the element 'SignUpSubmitButton' is clicked
 Then the element 'SignUpPasswordValidationError' is present
 Examples:
 | Name | LastName | Login |
 | Oleg1 | Z1 | Oleg1Z1 |
 | Oleg2 | Z2 | Oleg2Z2 |
Specflow &amp; bdd

More Related Content

Specflow &amp; bdd

  • 2. OLEG ZAREVYCH - Automation QA @ Ciklum - At least 4 years experience in QA - 1 year working with SpecFlow
  • 4. BDD IS A SECOND-GENERATION, OUTSIDEIN, PULL- BASED, MULTIPLE-STAKEHOLDER, MULTIPLE-SCALE, HIGH-AUTOMATION, AGILE METHODOLOGY. IT DESCRIBES A CYCLE OF INTERACTIONS WITH WELL- DEFINED OUTPUTS, RESULTING IN THE DELIVERY OF WORKING, TESTED SOFTWARE THAT MATTERS. Dan North
  • 5. BEHAVIOR-DRIVEN DEVELOPMENT - Based on TDD approach - Driven by business value - Collaborate technical and non-technical stakeholders - Acceptance criteria and users tory defined in natural language in feature file Business Domain driven design Technology Test driven development
  • 6. TOOLS FOR BDD - Java : jbehave, Cucumber - Python : Behave - Ruby : RSpec - PHP : Behat - JS : CucumberJS - C# : SpecFlow
  • 8. WHY ? Reusable Regex based Human Language support Cross-framework Describe behavior in understandable way
  • 9. GHERKIN LANGUAGE As a [X] I want [Y] so that [Z] Given some initial context (the givens), When an event occurs, then ensure some outcomes.
  • 10. TEMPLATES Scenario: Google.Failed Registration first users Given the browser with 'https://accounts.google.com/SignUp' is started When the element 'Name', 'LastName', 'Login' is filled | Name | LastName | Login | | Oleg1 | Z1 | Oleg1Z1 | When the element 'SignUpSubmitButton' is clicked Then the element 'SignUpPasswordValidationError' is present Scenario: Google.Failed Registration second users Given the browser with 'https://accounts.google.com/SignUp' is started When the element 'Name', 'LastName', 'Login' is filled | Name | LastName | Login | | Oleg1 | Z1 | Oleg1Z1 | When the element 'SignUpSubmitButton' is clicked Then the element 'SignUpPasswordValidationError' is present Scenario Outline: Google search2x Given the browser with 'https://accounts.google.com/SignUp' is started When the element <Name>, <LastName>, <Login> is filled When the element 'SignUpSubmitButton' is clicked Then the element 'SignUpPasswordValidationError' is present Examples: | Name | LastName | Login | | Oleg1 | Z1 | Oleg1Z1 | | Oleg2 | Z2 | Oleg2Z2 |

Editor's Notes

  1. Y is some feature, Z is the benefit or value of the feature, X is the person (or role) who will benefit