SlideShare a Scribd company logo
1 of 10
Behavioral tests
with Behat for QA
Sergey Bielanovskiy
Problems:
Software regression
No so rare issue, when after some time appears
that some feature accidently stopped working.
Manual regression tests
Before each release spend time for this, but it
actually not fully cover all cases because of
human factor.
Knowledge of project features
Without documentation there is no clear way to
find out how to do this or that.
Solution:
Automated behaviour tests
Check functionality often and automatically and
detect regression ahead.
Spend QA time more efficiently
Save time on manual regression. Avoid human
factor during tests.
Knowledge share
Features test cases can be used as source of
information about project functionality.
BDD=TDD+DDD
- Behaviour Driven Development
- Successor of TDD but with behavioral tests, inspired
by DDD
- core sense of BDD - clear conversation between
business and developer, ubiquitous language
- automating of BDD test is very second part of the
process, main purpose and goal, to eliminate
communicate problem that can be very costly
- Test Drive Development
- do tests first, after that code
- Domain Driven Design
- project domain is first, and from this point plan and
build software, use same terminology and so
Cucumber & Gherkin
- Cucumber is tool that were done to be able to run
automated tests in BDD style
- Gherkin is implementation of BDD’s ubiquitous language
Gherkin syntax
- the goal to enforce firm,
unambiguous
requirements, that will be
readable by any person
- clearly outline purpose of
feature, benefits for
involved end user
- scenarios main parts are
Given/When/Then, each
line is step
Feature: Some terse yet descriptive text of what is desired
In order to realize a named business value
As an explicit system actor
I want to gain some beneficial outcome which furthers the goal
Scenario: Some determinable business situation
Given some precondition
And some other precondition
When some action by the actor
And some other action
And yet another action
Then some testable outcome is achieved
And something else we can check happens too
Scenario: A different situation
...
Behat, Mink, MinkExtension
- Behat actually just transform Gherkin into PHP calls that
should be implemented by developer
- in general BDD process expects that Gherkin sentences
will be written in very clear language and not necessary
will be reused at another page, and expects that developer
later automate it if needed, main goal is clear sentences
- Mink is standalone tool, that allow control browser with
help of some drivers (selenium/goutte/etc)
- MinkExtension offer list of already transformed sentences
of Gherkin into calls that interact with browser for long list
of actions, like navigation, filling forms, etc
Handled by QA on their
own
- MinkExtension steps expects to work with very well-formed
HTML, but in app with modern design, Wikipedia as
example, this isn’t so simple and it’s usage will lead to low
quality and not so readable features like “I click on #row
a”, because of unfortunately not so well-formed HTML
- here help extension for Behat named Business Selector
Extension, that allow store in configuration file mapping
like “Some button: #row a”, making possible “I click on
Some button”
- with help of this QA can on their own, without developers
help, implement behavioral tests, populate this file by use
of Chrome inbuilt selectors copy functionality and use this
selectors in Business Selector Extension steps
Tool or framework is
just base
- this is very good, but not necessary to outline requirements
in Gherkin and follow BDD process
- Behats can be used just as acceptance testing tool to fix
software regression, reduce time for manual regression
and so
- QA can translate requirements in Gherkin, promoting more
robust flow
that’s all, be safe during making tricky decisions ;]

More Related Content

What's hot

Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Mindfire Solutions
 
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...MobileMonday Estonia
 
Six Steps to Conversation Driven Development
Six Steps to Conversation Driven DevelopmentSix Steps to Conversation Driven Development
Six Steps to Conversation Driven DevelopmentRasa Technologies
 
Testing stage. being ahead business with cucumber
Testing stage. being ahead business with cucumberTesting stage. being ahead business with cucumber
Testing stage. being ahead business with cucumberAlex Mikitenko
 
Effective communication within the software developers team
Effective communication within the software developers teamEffective communication within the software developers team
Effective communication within the software developers teamNatalia Klymenko
 
TDD Mini Workshop @ Bucharest JUG 2014 04 24
TDD Mini Workshop @ Bucharest JUG 2014 04 24TDD Mini Workshop @ Bucharest JUG 2014 04 24
TDD Mini Workshop @ Bucharest JUG 2014 04 24Adi Bolboaca
 
Runing JMeter Tests On Rancher
Runing JMeter Tests On RancherRuning JMeter Tests On Rancher
Runing JMeter Tests On RancherBogdan Marian
 
Running Automated Acceptance Tests On Rancher
Running Automated Acceptance Tests On RancherRunning Automated Acceptance Tests On Rancher
Running Automated Acceptance Tests On RancherBogdan Marian
 
Android Devops : Master Continuous Integration and Delivery
Android Devops : Master Continuous Integration and DeliveryAndroid Devops : Master Continuous Integration and Delivery
Android Devops : Master Continuous Integration and Deliverymahmoud ramadan
 
Webinar: How to Use Integrated Version Control in Rasa X
Webinar: How to Use Integrated Version Control in Rasa XWebinar: How to Use Integrated Version Control in Rasa X
Webinar: How to Use Integrated Version Control in Rasa XRasa Technologies
 
“One man” development process model
“One man” development process model“One man” development process model
“One man” development process modelSilicon Straits
 
jBPM At Riviera JUG
jBPM At Riviera JUGjBPM At Riviera JUG
jBPM At Riviera JUGTom Baeyens
 
Software Craftsmanship @ Ntnu
Software Craftsmanship @ NtnuSoftware Craftsmanship @ Ntnu
Software Craftsmanship @ Ntnugoeran
 
Clean Code: Successive Refinement
Clean Code: Successive RefinementClean Code: Successive Refinement
Clean Code: Successive RefinementAli A Jalil
 
How do i implement command design pattern in the java programming course with...
How do i implement command design pattern in the java programming course with...How do i implement command design pattern in the java programming course with...
How do i implement command design pattern in the java programming course with...kritikumar16
 

What's hot (19)

Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)
 
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...
 
Six Steps to Conversation Driven Development
Six Steps to Conversation Driven DevelopmentSix Steps to Conversation Driven Development
Six Steps to Conversation Driven Development
 
Testing stage. being ahead business with cucumber
Testing stage. being ahead business with cucumberTesting stage. being ahead business with cucumber
Testing stage. being ahead business with cucumber
 
Effective communication within the software developers team
Effective communication within the software developers teamEffective communication within the software developers team
Effective communication within the software developers team
 
TDD Mini Workshop @ Bucharest JUG 2014 04 24
TDD Mini Workshop @ Bucharest JUG 2014 04 24TDD Mini Workshop @ Bucharest JUG 2014 04 24
TDD Mini Workshop @ Bucharest JUG 2014 04 24
 
Runing JMeter Tests On Rancher
Runing JMeter Tests On RancherRuning JMeter Tests On Rancher
Runing JMeter Tests On Rancher
 
Java interfaces design perspective
Java interfaces design perspectiveJava interfaces design perspective
Java interfaces design perspective
 
Running Automated Acceptance Tests On Rancher
Running Automated Acceptance Tests On RancherRunning Automated Acceptance Tests On Rancher
Running Automated Acceptance Tests On Rancher
 
Scrum
ScrumScrum
Scrum
 
Android Devops : Master Continuous Integration and Delivery
Android Devops : Master Continuous Integration and DeliveryAndroid Devops : Master Continuous Integration and Delivery
Android Devops : Master Continuous Integration and Delivery
 
Code Quality
Code QualityCode Quality
Code Quality
 
Webinar: How to Use Integrated Version Control in Rasa X
Webinar: How to Use Integrated Version Control in Rasa XWebinar: How to Use Integrated Version Control in Rasa X
Webinar: How to Use Integrated Version Control in Rasa X
 
“One man” development process model
“One man” development process model“One man” development process model
“One man” development process model
 
Why Scm
Why ScmWhy Scm
Why Scm
 
jBPM At Riviera JUG
jBPM At Riviera JUGjBPM At Riviera JUG
jBPM At Riviera JUG
 
Software Craftsmanship @ Ntnu
Software Craftsmanship @ NtnuSoftware Craftsmanship @ Ntnu
Software Craftsmanship @ Ntnu
 
Clean Code: Successive Refinement
Clean Code: Successive RefinementClean Code: Successive Refinement
Clean Code: Successive Refinement
 
How do i implement command design pattern in the java programming course with...
How do i implement command design pattern in the java programming course with...How do i implement command design pattern in the java programming course with...
How do i implement command design pattern in the java programming course with...
 

Similar to Behavioral tests with behat for qa

Topic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionTopic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionHoa Le
 
Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Sakares Saengkaew
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWDVikas Sarin
 
BDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User StoriesBDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User StoriesSauce Labs
 
Introducing BDD and TDD with Cucumber
Introducing BDD and TDD with CucumberIntroducing BDD and TDD with Cucumber
Introducing BDD and TDD with CucumberKnoldus Inc.
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentAdam Englander
 
Functional testing with behat
Functional testing with behatFunctional testing with behat
Functional testing with behatTahmina Khatoon
 
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...Katy Slemon
 
PHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for BeginnersPHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for BeginnersAdam Englander
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanQA or the Highway
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginnersAdam Englander
 
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009Portal Deployment Best Practices | IBM Portal Excellence Conference 2009
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009Perficient, Inc.
 
BDD presentation
BDD presentationBDD presentation
BDD presentationtemebele
 
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...Agile Testing Alliance
 
Automation test framework with cucumber – BDD
Automation test framework with cucumber – BDDAutomation test framework with cucumber – BDD
Automation test framework with cucumber – BDD123abcda
 

Similar to Behavioral tests with behat for qa (20)

Topic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionTopic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolution
 
Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
 
BDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User StoriesBDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User Stories
 
Introducing BDD and TDD with Cucumber
Introducing BDD and TDD with CucumberIntroducing BDD and TDD with Cucumber
Introducing BDD and TDD with Cucumber
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Quality Software Development
Quality Software DevelopmentQuality Software Development
Quality Software Development
 
prod-dev-management.pptx
prod-dev-management.pptxprod-dev-management.pptx
prod-dev-management.pptx
 
DDD with Behat
DDD with BehatDDD with Behat
DDD with Behat
 
Functional testing with behat
Functional testing with behatFunctional testing with behat
Functional testing with behat
 
Usable Software Design
Usable Software DesignUsable Software Design
Usable Software Design
 
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
 
PHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for BeginnersPHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for Beginners
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginners
 
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009Portal Deployment Best Practices | IBM Portal Excellence Conference 2009
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
 
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
 
Automation test framework with cucumber – BDD
Automation test framework with cucumber – BDDAutomation test framework with cucumber – BDD
Automation test framework with cucumber – BDD
 

Recently uploaded

Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxsomshekarkn64
 

Recently uploaded (20)

Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptx
 

Behavioral tests with behat for qa

  • 1. Behavioral tests with Behat for QA Sergey Bielanovskiy
  • 2. Problems: Software regression No so rare issue, when after some time appears that some feature accidently stopped working. Manual regression tests Before each release spend time for this, but it actually not fully cover all cases because of human factor. Knowledge of project features Without documentation there is no clear way to find out how to do this or that.
  • 3. Solution: Automated behaviour tests Check functionality often and automatically and detect regression ahead. Spend QA time more efficiently Save time on manual regression. Avoid human factor during tests. Knowledge share Features test cases can be used as source of information about project functionality.
  • 4. BDD=TDD+DDD - Behaviour Driven Development - Successor of TDD but with behavioral tests, inspired by DDD - core sense of BDD - clear conversation between business and developer, ubiquitous language - automating of BDD test is very second part of the process, main purpose and goal, to eliminate communicate problem that can be very costly - Test Drive Development - do tests first, after that code - Domain Driven Design - project domain is first, and from this point plan and build software, use same terminology and so
  • 5. Cucumber & Gherkin - Cucumber is tool that were done to be able to run automated tests in BDD style - Gherkin is implementation of BDD’s ubiquitous language
  • 6. Gherkin syntax - the goal to enforce firm, unambiguous requirements, that will be readable by any person - clearly outline purpose of feature, benefits for involved end user - scenarios main parts are Given/When/Then, each line is step Feature: Some terse yet descriptive text of what is desired In order to realize a named business value As an explicit system actor I want to gain some beneficial outcome which furthers the goal Scenario: Some determinable business situation Given some precondition And some other precondition When some action by the actor And some other action And yet another action Then some testable outcome is achieved And something else we can check happens too Scenario: A different situation ...
  • 7. Behat, Mink, MinkExtension - Behat actually just transform Gherkin into PHP calls that should be implemented by developer - in general BDD process expects that Gherkin sentences will be written in very clear language and not necessary will be reused at another page, and expects that developer later automate it if needed, main goal is clear sentences - Mink is standalone tool, that allow control browser with help of some drivers (selenium/goutte/etc) - MinkExtension offer list of already transformed sentences of Gherkin into calls that interact with browser for long list of actions, like navigation, filling forms, etc
  • 8. Handled by QA on their own - MinkExtension steps expects to work with very well-formed HTML, but in app with modern design, Wikipedia as example, this isn’t so simple and it’s usage will lead to low quality and not so readable features like “I click on #row a”, because of unfortunately not so well-formed HTML - here help extension for Behat named Business Selector Extension, that allow store in configuration file mapping like “Some button: #row a”, making possible “I click on Some button” - with help of this QA can on their own, without developers help, implement behavioral tests, populate this file by use of Chrome inbuilt selectors copy functionality and use this selectors in Business Selector Extension steps
  • 9. Tool or framework is just base - this is very good, but not necessary to outline requirements in Gherkin and follow BDD process - Behats can be used just as acceptance testing tool to fix software regression, reduce time for manual regression and so - QA can translate requirements in Gherkin, promoting more robust flow
  • 10. that’s all, be safe during making tricky decisions ;]