SlideShare uma empresa Scribd logo
1 de 25
SpecFlow for Agile
Teams
Alejandro Ramirez
Senior Consultant
Polaris Solutions
Platinum Sponsors
Silver Sponsors
Gold Sponsors
The evolved role of testing
Image credit: http://www.archeolog-home.com/pages/content/how-humans-became-masters-of-the-earth.html
Black-Box Agile
Test automation pyramid
GUI
Tests
Acceptance Tests
Unit Tests
Manual
Tests
Test automation pyramid
GUI
Tests
Acceptance Tests / BDD | ATDD
Unit Tests / Component Tests/ TDD
Manual
Tests
CodedUI Visual Studio
SpecFlow Visual Studio
xUnit Visual Studio
Manual Test Cases
Exploratory Tests
MTM
Agile
Maturity
ATDD or BDD?
They are the same thing!
Agile techniques
Started in 2003
Understanding software behavior through discussion
Discussing acceptance criteria with examples
Focus on why and benefits of code
Embodies the definition of done in tests
Image is copyright of Nintendo
https://microsite.nintendo-europe.com/Stay_Updated/ptPT/
What is SpecFlow?
Not a pickle
Automated testing tool
Runs acceptance tests written in BDD style
It’s Cucumber for .NET
What you need to use it
• Visual Studio
• SpecFlow package
• Learn Gherkin
How to use SpecFlow in 3 Steps
ONE: Specify behavior in Gherkin
TWO: Automate scenarios
THREE: Enjoy and repeat
Example( y o u a r e g o i n g t o l o v e i t )
Specifying behavior with Gherkin
Describe behavior in plain English
Given,
When,
Then
In order to,
As a,
I want to
Feature
Behavior
Feature: Add Customer
In order to store new customer information
As a User of the XYZ system
I want to be able to create and store new customers
Scenario 1: Happy Path
Given a user has entered information about a customer
When he/she completes entering more information
Then the customer information should be stored in the system
Scenario 1 (more elaborate)
Given a user has entered information about a customer
And he/she has provided a first name and a last name
When he/she completes entering more information
Then the customer information should be stored in the system
Scenario 1 (even more elaborate)
Given a user has entered information about a customer
And he/she has provided a first name and a last name
When he/she completes entering more information
Then the customer information should be stored in the system
Scenario 1 (even more elaborate)
Given a user has entered information about a customer
And he/she has provided a first name and a last name
When he/she completes entering more information
Then the customer information should be stored in the system
Scenario 2: Missing Required Data
Given a user has entered information about a customer
And he/she has not provided the first name and last name
When he/she completes entering more information
Then the user will be notified about the missing data
And the customer will not be stored into the system
Exercise
In real life:
Quick Demo
Automating behaviors
Generate stubs
Fill in the blanks
Run
SpecFlow approaches for agile teams
Service layer
Integration
GUI
SpecFlow approaches for agile teams
Dev + BA
Dev + Test + BA
Dev + Test
Do you want to know more?
Contact:
alejandro.ramirez@polarissolutions.com
@alejandrormz
www.polarissolutions.com
Q&A

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Automated Acceptance Tests in .NET
Automated Acceptance Tests in .NETAutomated Acceptance Tests in .NET
Automated Acceptance Tests in .NET
 
Selenium + Specflow
Selenium + SpecflowSelenium + Specflow
Selenium + Specflow
 
Automated tests to a REST API
Automated tests to a REST APIAutomated tests to a REST API
Automated tests to a REST API
 
BDD with SpecFlow and Selenium
BDD with SpecFlow and SeleniumBDD with SpecFlow and Selenium
BDD with SpecFlow and Selenium
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
 
Points.com fisheye crucible code reviews 2011
Points.com fisheye crucible code reviews 2011Points.com fisheye crucible code reviews 2011
Points.com fisheye crucible code reviews 2011
 
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
 
Automated testing in javascript
Automated testing in javascriptAutomated testing in javascript
Automated testing in javascript
 
Using Specflow for BDD
Using Specflow for BDDUsing Specflow for BDD
Using Specflow for BDD
 
Serenity-BDD training
Serenity-BDD trainingSerenity-BDD training
Serenity-BDD training
 
Cypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests courseCypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests course
 
Codeception Testing Framework -- English #phpkansai
Codeception Testing Framework -- English #phpkansaiCodeception Testing Framework -- English #phpkansai
Codeception Testing Framework -- English #phpkansai
 
Automation and Technical Debt
Automation and Technical DebtAutomation and Technical Debt
Automation and Technical Debt
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Gherkin /BDD intro
 
Testing the untestable
Testing the untestableTesting the untestable
Testing the untestable
 
Introduction to Bdd and cucumber
Introduction to Bdd and cucumberIntroduction to Bdd and cucumber
Introduction to Bdd and cucumber
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
 
ATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot FrameworkATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot Framework
 
EVOLVE'15 | Enhance | Rene Ugarte | AEM Quality Assurance
EVOLVE'15 | Enhance | Rene Ugarte | AEM Quality AssuranceEVOLVE'15 | Enhance | Rene Ugarte | AEM Quality Assurance
EVOLVE'15 | Enhance | Rene Ugarte | AEM Quality Assurance
 
Help! My Legacy Application is Unmaintainable!
Help! My Legacy Application is Unmaintainable!Help! My Legacy Application is Unmaintainable!
Help! My Legacy Application is Unmaintainable!
 

Destaque

Confort Bus Services
Confort Bus ServicesConfort Bus Services
Confort Bus Services
Confort Bus
 
Sportbooking T T B V
Sportbooking  T T  B VSportbooking  T T  B V
Sportbooking T T B V
guske
 
Perl 111223 my college tomorrow article
Perl 111223 my college tomorrow articlePerl 111223 my college tomorrow article
Perl 111223 my college tomorrow article
Stéphane VINCENT
 
Carta de presentación de candidatura patxi aldecoa
Carta de presentación de candidatura patxi aldecoaCarta de presentación de candidatura patxi aldecoa
Carta de presentación de candidatura patxi aldecoa
Patxialdecoa
 
Acuerdo extrajudicial de pagos
Acuerdo extrajudicial de pagosAcuerdo extrajudicial de pagos
Acuerdo extrajudicial de pagos
mercetorrasgali
 
Hydraulic Torque & Tension Bolted Connection
Hydraulic Torque & Tension Bolted ConnectionHydraulic Torque & Tension Bolted Connection
Hydraulic Torque & Tension Bolted Connection
Chris Withers
 
Métodos de-recuperación-de-información-para-medios-ópticos-y-discos-duros-1 (1)
Métodos de-recuperación-de-información-para-medios-ópticos-y-discos-duros-1 (1)Métodos de-recuperación-de-información-para-medios-ópticos-y-discos-duros-1 (1)
Métodos de-recuperación-de-información-para-medios-ópticos-y-discos-duros-1 (1)
kerlly villon
 
Document 2012-03-28-11858067-0-the-wealth-report-2012
Document 2012-03-28-11858067-0-the-wealth-report-2012Document 2012-03-28-11858067-0-the-wealth-report-2012
Document 2012-03-28-11858067-0-the-wealth-report-2012
Daya Dayarayan Canada
 
Building Contagious Commitment for Change - Workshop with Helen Bevan | April...
Building Contagious Commitment for Change - Workshop with Helen Bevan | April...Building Contagious Commitment for Change - Workshop with Helen Bevan | April...
Building Contagious Commitment for Change - Workshop with Helen Bevan | April...
Saskatchewan Health Care Quality Summit
 
Team p foodie zone - 083012 canvas-v2
Team p   foodie zone - 083012 canvas-v2Team p   foodie zone - 083012 canvas-v2
Team p foodie zone - 083012 canvas-v2
Stanford University
 
Adysa Group Club de Fidelización
Adysa Group Club de FidelizaciónAdysa Group Club de Fidelización
Adysa Group Club de Fidelización
Adysa Group
 
Tagging Systems to Assist Visually Impaired Users Identify Visual Data in Clo...
Tagging Systems to Assist Visually Impaired Users Identify Visual Data in Clo...Tagging Systems to Assist Visually Impaired Users Identify Visual Data in Clo...
Tagging Systems to Assist Visually Impaired Users Identify Visual Data in Clo...
Kate Ringland
 

Destaque (20)

Confort Bus Services
Confort Bus ServicesConfort Bus Services
Confort Bus Services
 
E FIT BANUS
E FIT BANUS E FIT BANUS
E FIT BANUS
 
Sportbooking T T B V
Sportbooking  T T  B VSportbooking  T T  B V
Sportbooking T T B V
 
Mesura de Govern: Pla Director de la Guàrdia Urbana
Mesura de Govern: Pla Director de la Guàrdia UrbanaMesura de Govern: Pla Director de la Guàrdia Urbana
Mesura de Govern: Pla Director de la Guàrdia Urbana
 
Perl 111223 my college tomorrow article
Perl 111223 my college tomorrow articlePerl 111223 my college tomorrow article
Perl 111223 my college tomorrow article
 
Carta de presentación de candidatura patxi aldecoa
Carta de presentación de candidatura patxi aldecoaCarta de presentación de candidatura patxi aldecoa
Carta de presentación de candidatura patxi aldecoa
 
Festes de la Mercè Almacelles 2012
Festes de la Mercè Almacelles 2012Festes de la Mercè Almacelles 2012
Festes de la Mercè Almacelles 2012
 
Acuerdo extrajudicial de pagos
Acuerdo extrajudicial de pagosAcuerdo extrajudicial de pagos
Acuerdo extrajudicial de pagos
 
Hydraulic Torque & Tension Bolted Connection
Hydraulic Torque & Tension Bolted ConnectionHydraulic Torque & Tension Bolted Connection
Hydraulic Torque & Tension Bolted Connection
 
Métodos de-recuperación-de-información-para-medios-ópticos-y-discos-duros-1 (1)
Métodos de-recuperación-de-información-para-medios-ópticos-y-discos-duros-1 (1)Métodos de-recuperación-de-información-para-medios-ópticos-y-discos-duros-1 (1)
Métodos de-recuperación-de-información-para-medios-ópticos-y-discos-duros-1 (1)
 
Cookies, normative e strategie per il marketing Digitale
Cookies, normative e strategie per il marketing DigitaleCookies, normative e strategie per il marketing Digitale
Cookies, normative e strategie per il marketing Digitale
 
Document 2012-03-28-11858067-0-the-wealth-report-2012
Document 2012-03-28-11858067-0-the-wealth-report-2012Document 2012-03-28-11858067-0-the-wealth-report-2012
Document 2012-03-28-11858067-0-the-wealth-report-2012
 
Hacia el despertar espiritual - José Manuel Martínez Sánchez
Hacia el despertar espiritual - José Manuel Martínez SánchezHacia el despertar espiritual - José Manuel Martínez Sánchez
Hacia el despertar espiritual - José Manuel Martínez Sánchez
 
Building Contagious Commitment for Change - Workshop with Helen Bevan | April...
Building Contagious Commitment for Change - Workshop with Helen Bevan | April...Building Contagious Commitment for Change - Workshop with Helen Bevan | April...
Building Contagious Commitment for Change - Workshop with Helen Bevan | April...
 
In-room TV: Smart TV solutions to Hotels, Hospitals and Care Homes
In-room TV: Smart TV solutions to Hotels, Hospitals and Care HomesIn-room TV: Smart TV solutions to Hotels, Hospitals and Care Homes
In-room TV: Smart TV solutions to Hotels, Hospitals and Care Homes
 
Team p foodie zone - 083012 canvas-v2
Team p   foodie zone - 083012 canvas-v2Team p   foodie zone - 083012 canvas-v2
Team p foodie zone - 083012 canvas-v2
 
Adysa Group Club de Fidelización
Adysa Group Club de FidelizaciónAdysa Group Club de Fidelización
Adysa Group Club de Fidelización
 
Tagging Systems to Assist Visually Impaired Users Identify Visual Data in Clo...
Tagging Systems to Assist Visually Impaired Users Identify Visual Data in Clo...Tagging Systems to Assist Visually Impaired Users Identify Visual Data in Clo...
Tagging Systems to Assist Visually Impaired Users Identify Visual Data in Clo...
 
Ideas fuerza de los grupos de trabajo
Ideas fuerza de los grupos de trabajoIdeas fuerza de los grupos de trabajo
Ideas fuerza de los grupos de trabajo
 
Fibromialgia
FibromialgiaFibromialgia
Fibromialgia
 

Semelhante a SpecFlow for Agile Teams

Behavior Driven Testing with SpecFlow
Behavior Driven Testing with SpecFlowBehavior Driven Testing with SpecFlow
Behavior Driven Testing with SpecFlow
Rachid Kherrazi
 
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
Tieturi Oy
 

Semelhante a SpecFlow for Agile Teams (20)

Behavior Driven Testing with SpecFlow
Behavior Driven Testing with SpecFlowBehavior Driven Testing with SpecFlow
Behavior Driven Testing with SpecFlow
 
Sumo Logic Cert Jam - Fundamentals
Sumo Logic Cert Jam - FundamentalsSumo Logic Cert Jam - Fundamentals
Sumo Logic Cert Jam - Fundamentals
 
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
 
FASHIONTOP.pptx
FASHIONTOP.pptxFASHIONTOP.pptx
FASHIONTOP.pptx
 
Specification workshops
Specification workshopsSpecification workshops
Specification workshops
 
Hotel management system
Hotel management systemHotel management system
Hotel management system
 
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
 
[Rakuten TechConf2014] [G-4] Beyond Agile Testing to Lean Development
[Rakuten TechConf2014] [G-4] Beyond Agile Testing to Lean Development[Rakuten TechConf2014] [G-4] Beyond Agile Testing to Lean Development
[Rakuten TechConf2014] [G-4] Beyond Agile Testing to Lean Development
 
Testers in an agile world
Testers in an agile worldTesters in an agile world
Testers in an agile world
 
Continuous Testing in Vegas
Continuous Testing in VegasContinuous Testing in Vegas
Continuous Testing in Vegas
 
Modern developer workflow
Modern developer workflowModern developer workflow
Modern developer workflow
 
E-LEARNING
E-LEARNINGE-LEARNING
E-LEARNING
 
Level 2 Certification: Using Sumo Logic - Oct 2018
Level 2 Certification: Using Sumo Logic - Oct 2018Level 2 Certification: Using Sumo Logic - Oct 2018
Level 2 Certification: Using Sumo Logic - Oct 2018
 
2 anton muzhailo - team development techniques you must know to be a valuab...
2   anton muzhailo - team development techniques you must know to be a valuab...2   anton muzhailo - team development techniques you must know to be a valuab...
2 anton muzhailo - team development techniques you must know to be a valuab...
 
Formal Versus Agile: Survival of the Fittest? (Paul Boca)
Formal Versus Agile: Survival of the Fittest? (Paul Boca)Formal Versus Agile: Survival of the Fittest? (Paul Boca)
Formal Versus Agile: Survival of the Fittest? (Paul Boca)
 
Project report(Smart Auction Access)
Project report(Smart Auction Access)Project report(Smart Auction Access)
Project report(Smart Auction Access)
 
Beyond Agile Testing to Lean Development — Rakuten Technology Conference
Beyond Agile Testing to Lean Development — Rakuten Technology ConferenceBeyond Agile Testing to Lean Development — Rakuten Technology Conference
Beyond Agile Testing to Lean Development — Rakuten Technology Conference
 
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
 
Debugging Production Applications in Nomad using Lightrun
Debugging Production Applications in Nomad using LightrunDebugging Production Applications in Nomad using Lightrun
Debugging Production Applications in Nomad using Lightrun
 
Barcamp Bangalore 2 - On User Experience and Usability Testing
Barcamp Bangalore 2 - On User Experience and Usability TestingBarcamp Bangalore 2 - On User Experience and Usability Testing
Barcamp Bangalore 2 - On User Experience and Usability Testing
 

Último

Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
lizamodels9
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
Matteo Carbone
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
dlhescort
 
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
amitlee9823
 

Último (20)

Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdf
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptx
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
 
Forklift Operations: Safety through Cartoons
Forklift Operations: Safety through CartoonsForklift Operations: Safety through Cartoons
Forklift Operations: Safety through Cartoons
 

SpecFlow for Agile Teams

  • 1. SpecFlow for Agile Teams Alejandro Ramirez Senior Consultant Polaris Solutions
  • 3. The evolved role of testing Image credit: http://www.archeolog-home.com/pages/content/how-humans-became-masters-of-the-earth.html Black-Box Agile
  • 4. Test automation pyramid GUI Tests Acceptance Tests Unit Tests Manual Tests
  • 5. Test automation pyramid GUI Tests Acceptance Tests / BDD | ATDD Unit Tests / Component Tests/ TDD Manual Tests CodedUI Visual Studio SpecFlow Visual Studio xUnit Visual Studio Manual Test Cases Exploratory Tests MTM Agile Maturity
  • 6. ATDD or BDD? They are the same thing! Agile techniques Started in 2003 Understanding software behavior through discussion Discussing acceptance criteria with examples Focus on why and benefits of code Embodies the definition of done in tests Image is copyright of Nintendo https://microsite.nintendo-europe.com/Stay_Updated/ptPT/
  • 7. What is SpecFlow? Not a pickle Automated testing tool Runs acceptance tests written in BDD style It’s Cucumber for .NET
  • 8. What you need to use it • Visual Studio • SpecFlow package • Learn Gherkin
  • 9. How to use SpecFlow in 3 Steps ONE: Specify behavior in Gherkin TWO: Automate scenarios THREE: Enjoy and repeat
  • 10. Example( y o u a r e g o i n g t o l o v e i t )
  • 11. Specifying behavior with Gherkin Describe behavior in plain English Given, When, Then In order to, As a, I want to Feature Behavior
  • 12. Feature: Add Customer In order to store new customer information As a User of the XYZ system I want to be able to create and store new customers
  • 13. Scenario 1: Happy Path Given a user has entered information about a customer When he/she completes entering more information Then the customer information should be stored in the system
  • 14. Scenario 1 (more elaborate) Given a user has entered information about a customer And he/she has provided a first name and a last name When he/she completes entering more information Then the customer information should be stored in the system
  • 15. Scenario 1 (even more elaborate) Given a user has entered information about a customer And he/she has provided a first name and a last name When he/she completes entering more information Then the customer information should be stored in the system
  • 16. Scenario 1 (even more elaborate) Given a user has entered information about a customer And he/she has provided a first name and a last name When he/she completes entering more information Then the customer information should be stored in the system
  • 17. Scenario 2: Missing Required Data Given a user has entered information about a customer And he/she has not provided the first name and last name When he/she completes entering more information Then the user will be notified about the missing data And the customer will not be stored into the system
  • 22. SpecFlow approaches for agile teams Service layer Integration GUI
  • 23. SpecFlow approaches for agile teams Dev + BA Dev + Test + BA Dev + Test
  • 24. Do you want to know more? Contact: alejandro.ramirez@polarissolutions.com @alejandrormz www.polarissolutions.com
  • 25. Q&A

Notas do Editor

  1. Evolution: Talk about how testers have been perceived through time. Dream come true: testing as a first-class citizen in agile. Team Members: Talk about how in agile is all about “roles”, and not so much about a “Tester” or “Developer”, but the skills they bring to the table
  2. Unit Testing and TDD: MSTest, NUnit Executable Specifications and BDD: SpecFlow UI Automation: CodedUI ES/SBE An executable specification is a description of software behavior written in natural language, but with a defined structure. A.K.A. Behavior-Driven Development (BDD) Acceptance-Test-Driven-Development (ATDD)  Gherkin uses GIVEN/WHEN/THEN structure that lets you write specifications like this: GIVEN that I have items in my basket, WHEN I go to the checkout, THEN I am shown a confirmation screen, AND the screen lists all the items in my basket. CodedUI requires: Visual Studio Premium or Ultimate Edition (CodedUI Test Project) Pitfalls Trying to do everything UI should be last resort When should I use UI testing? Test the things that are only possible from the UI Navigation The way the user interacts Stuff you can't test from Unit tests When not? Validating business rules ONLY TEST THINGS YOU CANNOT TEST WITH UNIT TESTS 3 Ways to use CodedUI Record & Playback (most common) Great way to get started Not the way to get the most ROI Most fragile way to build your test automation Be careful of multiple team members recording at the same time and merging the UIMap files One big chunk of unmaintainable code Use Recording of UI Maps to abstract the UI and then code against the abstraction More maintainable Be careful about maintaining UI Map files Create multiple UI maps, each one targeting a specific part of your UI Record ACTIONS and ASSERTIONS in separate UIMap Files Hand code everything and not use UI Map files Most control Most time-consuming Use UI Maps only for specific purposes like locating controls Create a UI Map per distinct par of the UI Requires more coding Page Object Pattern Helps you abstract the details of HOW the UI is CONSTRUCTED We create a class that represents the screen we see when we browse a web page, and we represent those UI elements as objects. Each Page Object abstracsts a PAGE or a PART OF A PAGE The Page Object has knowledge of the page and has the ability to find controls within the page. A Page Object has Methods Provides services to the test developer Abstracts the way UI elements are located Returns page objects A Page Object has Query Methods Used in assertions so deails about the UI stay with the object and don't leak to your test E.G. IsPageValid() os IsItemInShoppingBasket("name of item") Assertion is done in the test!
  3. Cucumber is a software tool that computer programmers use for testing other software. It runs automated acceptance tests written in a behavior-driven development (BDD) style. Specification by Example An executable specification is a description of software behavior written in natural language, but with a defined structure. Cucumber is written in the Ruby programming language.[6][7] Cucumber projects are available for other platforms beyond Ruby. Some use Ruby Cucumber with a bridge into the target language (e.g. cuke4php and cuke4lua). Others use the Gherkin parser but implement everything else in the target language.[8] Cucumber allows the execution of feature documentation written in business-facing text.
  4. Talk about the work that goes into Test Planning Sprint Planning vs. Poker Planning
  5. Gherkin is the language that Cucumber understands. It is a Business Readable, Domain Specific Language that lets you describe software’s behaviour without detailing how that behaviour is implemented. Gherkin’s grammar is defined in the Treetop grammar that is part of the Cucumber codebase. The grammar exists in different flavours for many spoken languages (37 at the time of writing), so that your team can use the keywords in your own language.   Gherkin uses GIVEN/WHEN/THEN structure that lets you write specifications like this: GIVEN that I have items in my basket, WHEN I go to the checkout, THEN I am shown a confirmation screen, AND the screen lists all the items in my basket.
  6. Gherkin is the language that Cucumber understands. It is a Business Readable, Domain Specific Language that lets you describe software’s behaviour without detailing how that behaviour is implemented. Gherkin’s grammar is defined in the Treetop grammar that is part of the Cucumber codebase. The grammar exists in different flavours for many spoken languages (37 at the time of writing), so that your team can use the keywords in your own language.   Gherkin uses GIVEN/WHEN/THEN structure that lets you write specifications like this: GIVEN that I have items in my basket, WHEN I go to the checkout, THEN I am shown a confirmation screen, AND the screen lists all the items in my basket.
  7. Gherkin is the language that Cucumber understands. It is a Business Readable, Domain Specific Language that lets you describe software’s behaviour without detailing how that behaviour is implemented. Gherkin’s grammar is defined in the Treetop grammar that is part of the Cucumber codebase. The grammar exists in different flavours for many spoken languages (37 at the time of writing), so that your team can use the keywords in your own language.   Gherkin uses GIVEN/WHEN/THEN structure that lets you write specifications like this: GIVEN that I have items in my basket, WHEN I go to the checkout, THEN I am shown a confirmation screen, AND the screen lists all the items in my basket.
  8. Gherkin is the language that Cucumber understands. It is a Business Readable, Domain Specific Language that lets you describe software’s behaviour without detailing how that behaviour is implemented. Gherkin’s grammar is defined in the Treetop grammar that is part of the Cucumber codebase. The grammar exists in different flavours for many spoken languages (37 at the time of writing), so that your team can use the keywords in your own language.   Gherkin uses GIVEN/WHEN/THEN structure that lets you write specifications like this: GIVEN that I have items in my basket, WHEN I go to the checkout, THEN I am shown a confirmation screen, AND the screen lists all the items in my basket.
  9. Gherkin is the language that Cucumber understands. It is a Business Readable, Domain Specific Language that lets you describe software’s behaviour without detailing how that behaviour is implemented. Gherkin’s grammar is defined in the Treetop grammar that is part of the Cucumber codebase. The grammar exists in different flavours for many spoken languages (37 at the time of writing), so that your team can use the keywords in your own language.   Gherkin uses GIVEN/WHEN/THEN structure that lets you write specifications like this: GIVEN that I have items in my basket, WHEN I go to the checkout, THEN I am shown a confirmation screen, AND the screen lists all the items in my basket.
  10. Gherkin is the language that Cucumber understands. It is a Business Readable, Domain Specific Language that lets you describe software’s behaviour without detailing how that behaviour is implemented. Gherkin’s grammar is defined in the Treetop grammar that is part of the Cucumber codebase. The grammar exists in different flavours for many spoken languages (37 at the time of writing), so that your team can use the keywords in your own language.   Gherkin uses GIVEN/WHEN/THEN structure that lets you write specifications like this: GIVEN that I have items in my basket, WHEN I go to the checkout, THEN I am shown a confirmation screen, AND the screen lists all the items in my basket.
  11. Gherkin is the language that Cucumber understands. It is a Business Readable, Domain Specific Language that lets you describe software’s behaviour without detailing how that behaviour is implemented. Gherkin’s grammar is defined in the Treetop grammar that is part of the Cucumber codebase. The grammar exists in different flavours for many spoken languages (37 at the time of writing), so that your team can use the keywords in your own language.   Gherkin uses GIVEN/WHEN/THEN structure that lets you write specifications like this: GIVEN that I have items in my basket, WHEN I go to the checkout, THEN I am shown a confirmation screen, AND the screen lists all the items in my basket.
  12. Talk about the work that goes into Test Planning Sprint Planning vs. Poker Planning
  13. Gherkin is the language that Cucumber understands. It is a Business Readable, Domain Specific Language that lets you describe software’s behaviour without detailing how that behaviour is implemented. Gherkin’s grammar is defined in the Treetop grammar that is part of the Cucumber codebase. The grammar exists in different flavours for many spoken languages (37 at the time of writing), so that your team can use the keywords in your own language.   Gherkin uses GIVEN/WHEN/THEN structure that lets you write specifications like this: GIVEN that I have items in my basket, WHEN I go to the checkout, THEN I am shown a confirmation screen, AND the screen lists all the items in my basket.
  14. Talk about the work that goes into Test Planning Sprint Planning vs. Poker Planning