11
SPECFLOW & BDD

Tech#Skills_Day BDD та SpecFlow

Embed Size (px)

Citation preview

Page 1: Tech#Skills_Day BDD та SpecFlow

SPECFLOW & BDD

Page 2: Tech#Skills_Day BDD та SpecFlow

OLEG ZAREVYCH- Automation QA @ Ciklum- At least 4 years experience in

QA- 1 year working with SpecFlow

Page 3: Tech#Skills_Day BDD та SpecFlow

WHAT IS BDD ?

Page 4: Tech#Skills_Day BDD та SpecFlow

“”

BDD IS A SECOND-GENERATION, OUTSIDE–IN, 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

Page 5: Tech#Skills_Day BDD та SpecFlow

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 fileBusiness• Domain

driven design

Technology• Test driven

development

Page 6: Tech#Skills_Day BDD та SpecFlow

TOOLS FOR BDD- Java : jbehave, Cucumber- Python : Behave- Ruby : RSpec- PHP : Behat- JS : CucumberJS- C# : SpecFlow

Page 7: Tech#Skills_Day BDD та SpecFlow

SPECFLOW

Page 8: Tech#Skills_Day BDD та SpecFlow

WHY ?

Reusable Regex based Human Language support Cross-framework Describe behavior in understandable way

Page 9: Tech#Skills_Day BDD та SpecFlow

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.

Page 10: Tech#Skills_Day BDD та SpecFlow

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 |

Page 11: Tech#Skills_Day BDD та SpecFlow