SlideShare une entreprise Scribd logo
1  sur  16
Automated Testing
                         With SpecFlow and WaTiN


                                              Dennis Doomen




© 2012 Aviva Solutions          dennis.doomen@avivasolutions.nl   30 augustus 2012
About Me
   • Principal Consultant
   • 15 years IT experience
   • C++ origins but C# since 2001
   • Specialties
      • .NET Architecture
      • Scrum/XP
      • ALM
   • Speaker
   • Public initiatives
      • Silverlight Cookbook
      • C# Coding Guidelines
      • Fluent Assertions
   • Internet
      • www.dennisdoomen.net
      • DZone MVB
      • @ddoomen
© 2012 Aviva Solutions               Dennis Doomen   30 augustus 2012
Challenges of User
                              Interface
                            Automation



© 2012 Aviva Solutions                    30 augustus 2012
Levels of UI Automation




                                                   Stability
                                 Functional

                               User Workflow

                              Technical Activity

© 2012 Aviva Solutions                                         30 augustus 2012
Smoke
         Specification                   Tests                 Performance
         by Example                                            Tests

                         Given a ninja has a third level black-belt
                         When attacked by Chuck Norris
                         Then the ninja should run for his life
     Living
                                                          Behavior Driven
     Documentation
                                                          Development
                                   Characteristics
                                   Tests




© 2012 Aviva Solutions                                                30 augustus 2012
ATDD combined with TDD




                             Image from Growing Object-Oriented Software, Guided by Tests




© 2012 Aviva Solutions                                                                      30 augustus 2012
Deep Dive
                          Demo



© 2012 Aviva Solutions               30 augustus 2012
Stability
                         Gherkin Scenarios    Functional

                   Step Definitions          User Workflow

                 WaTiN                   Technical Activity



© 2012 Aviva Solutions                                                    30 augustus 2012
Required Skills
                            Scenarios




                                            Coding Skills

                                                            Testing Skills
                         Step Definitions



                          Support Code

                             WaTiN




© 2012 Aviva Solutions                                                       30 augustus 2012
Features
     •     Represent functional slices
     •     Use Ubiquitous Language
     •     Name liked a book or chapter
     •     Organized by Epic User Stories



      Feature: Hosting Dinners
          In order to increase my business network
          As a entrepeneur
          I want to host dinners with interesting people from the community


© 2012 Aviva Solutions                                                        30 augustus 2012
Scenarios
     •     Key Examples of the Feature
     •     Stakeholder perspective
     •     UI agnostic
     •     != test scripts
     •     Manually executable
     •     Grammatically correct
    Scenario: Attempting to host a dinner as a registered user
        Given a registered user
        When you want to host a dinner
        Then you should be able to schedule a dinner


© 2012 Aviva Solutions                                           30 augustus 2012
Steps
     •     Global over all features
     •     Don’t combine
     •     Given = state
     •     When = actions
     •     Then = visible change

    Scenario: Attempting to host a dinner as a registered user
        Given a registered user
        When you want to host a dinner
        Then you should be able to schedule a dinner


© 2012 Aviva Solutions                                           30 augustus 2012
Step Definition
     • Grouped by entities, entity
       groups or domain concepts
     • Always use Page/Control
       pattern
     • No private helper methods




© 2012 Aviva Solutions               30 augustus 2012
Tables

                    Scoped                      Scenario
                    Bindings                    Outlines

                                                           Hooks
                                Advanced Topics
                         Tags

                                Step-Argument
                                Conversion       Step Definitions
                                                 Data Sharing
      Assist Helpers


© 2012 Aviva Solutions                                              30 augustus 2012
Reading Material
     • Demo Code
           https://github.com/dennisdoomen/specflowdemo

     • The Cucumber Book
           http://pragprog.com/book/hwcuc/the-cucumber-book

     • The Secret Ninja Cucumber Scrolls
           http://cuke4ninja.com/toc.html

     • Death by UI Test Automation
           http://gojko.net/2010/07/29/the-sine-of-death-by-ui-test-automation/

     • Code-to-Test Ratios, TDD and BDD
           http://www.infoq.com/articles/virtual-panel-tdd-bdd

     • Growing Object-Oriented Software, Guided by Tests
           http://www.amazon.com/Growing-Object-Oriented-Software-Guided-
           Tests/dp/0321503627




© 2012 Aviva Solutions                                                            30 augustus 2012
Email
                         dennis.doomen@avivasolutions.nl

                                                Twitter
                                             @ddoomen

                                                 Blog
                                 www.dennisdoomen.net

© 2012 Aviva Solutions                              30 augustus 2012

Contenu connexe

Plus de Dennis Doomen

My Laws of Test Driven Development (2023)
My Laws of Test Driven Development (2023)My Laws of Test Driven Development (2023)
My Laws of Test Driven Development (2023)Dennis Doomen
 
Design patterns for Event Sourcing in .NET
Design patterns for Event Sourcing in .NETDesign patterns for Event Sourcing in .NET
Design patterns for Event Sourcing in .NETDennis Doomen
 
Automate Infrastructure with Pulumi and C#
Automate Infrastructure with Pulumi and C#Automate Infrastructure with Pulumi and C#
Automate Infrastructure with Pulumi and C#Dennis Doomen
 
What is the right unit in unit testing (UpdateConf 2022)
What is the right unit in unit testing (UpdateConf 2022)What is the right unit in unit testing (UpdateConf 2022)
What is the right unit in unit testing (UpdateConf 2022)Dennis Doomen
 
Slow Event Sourcing (re)projections - Just make them faster!
Slow Event Sourcing (re)projections - Just make them faster!Slow Event Sourcing (re)projections - Just make them faster!
Slow Event Sourcing (re)projections - Just make them faster!Dennis Doomen
 
50 things software teams should not do.pptx
50 things software teams should not do.pptx50 things software teams should not do.pptx
50 things software teams should not do.pptxDennis Doomen
 
What is the right "unit" in unit testing and why it is not a class?
What is the right "unit" in unit testing and why it is not a class?What is the right "unit" in unit testing and why it is not a class?
What is the right "unit" in unit testing and why it is not a class?Dennis Doomen
 
A lab around the principles and practices for writing maintainable code
A lab around the principles and practices for writing maintainable codeA lab around the principles and practices for writing maintainable code
A lab around the principles and practices for writing maintainable codeDennis Doomen
 
How to Practice TDD Without Shooting Yourself in the Foot
How to Practice TDD Without Shooting Yourself in the FootHow to Practice TDD Without Shooting Yourself in the Foot
How to Practice TDD Without Shooting Yourself in the FootDennis Doomen
 
Decomposing the Monolith using modern-day .NET and a touch of microservices
Decomposing the Monolith using modern-day .NET and a touch of microservicesDecomposing the Monolith using modern-day .NET and a touch of microservices
Decomposing the Monolith using modern-day .NET and a touch of microservicesDennis Doomen
 
Event Sourcing from the Trenches (DDD Europe 2020)
Event Sourcing from the Trenches (DDD Europe 2020)Event Sourcing from the Trenches (DDD Europe 2020)
Event Sourcing from the Trenches (DDD Europe 2020)Dennis Doomen
 
Practical introduction to DDD, CQRS and Event Sourcing
Practical introduction to DDD, CQRS and Event SourcingPractical introduction to DDD, CQRS and Event Sourcing
Practical introduction to DDD, CQRS and Event SourcingDennis Doomen
 
How to practice TDD without shooting yourself in the foot
How to practice TDD without shooting yourself in the footHow to practice TDD without shooting yourself in the foot
How to practice TDD without shooting yourself in the footDennis Doomen
 
Decomposing the Monolith (Riga Dev Days 2019)
Decomposing the Monolith (Riga Dev Days 2019)Decomposing the Monolith (Riga Dev Days 2019)
Decomposing the Monolith (Riga Dev Days 2019)Dennis Doomen
 
A lab around the principles and practices for writing maintainable code (2019)
A lab around the principles and practices for writing maintainable code (2019)A lab around the principles and practices for writing maintainable code (2019)
A lab around the principles and practices for writing maintainable code (2019)Dennis Doomen
 
Lessons learned from two decades of professional software development
Lessons learned from two decades of professional software developmentLessons learned from two decades of professional software development
Lessons learned from two decades of professional software developmentDennis Doomen
 
The Good, The Bad and The Ugly of Event Sourcing
The Good, The Bad and The Ugly of Event Sourcing The Good, The Bad and The Ugly of Event Sourcing
The Good, The Bad and The Ugly of Event Sourcing Dennis Doomen
 
Event Sourcing from the Trenches (with examples from .NET)
Event Sourcing from the Trenches (with examples from .NET)Event Sourcing from the Trenches (with examples from .NET)
Event Sourcing from the Trenches (with examples from .NET)Dennis Doomen
 
How To Practice TDD Without Shooting Yourself In The Foot
How To Practice TDD Without Shooting Yourself In The FootHow To Practice TDD Without Shooting Yourself In The Foot
How To Practice TDD Without Shooting Yourself In The FootDennis Doomen
 
Decomposing the monolith into embeddable microservices using OWIN, WebHooks, ...
Decomposing the monolith into embeddable microservices using OWIN, WebHooks, ...Decomposing the monolith into embeddable microservices using OWIN, WebHooks, ...
Decomposing the monolith into embeddable microservices using OWIN, WebHooks, ...Dennis Doomen
 

Plus de Dennis Doomen (20)

My Laws of Test Driven Development (2023)
My Laws of Test Driven Development (2023)My Laws of Test Driven Development (2023)
My Laws of Test Driven Development (2023)
 
Design patterns for Event Sourcing in .NET
Design patterns for Event Sourcing in .NETDesign patterns for Event Sourcing in .NET
Design patterns for Event Sourcing in .NET
 
Automate Infrastructure with Pulumi and C#
Automate Infrastructure with Pulumi and C#Automate Infrastructure with Pulumi and C#
Automate Infrastructure with Pulumi and C#
 
What is the right unit in unit testing (UpdateConf 2022)
What is the right unit in unit testing (UpdateConf 2022)What is the right unit in unit testing (UpdateConf 2022)
What is the right unit in unit testing (UpdateConf 2022)
 
Slow Event Sourcing (re)projections - Just make them faster!
Slow Event Sourcing (re)projections - Just make them faster!Slow Event Sourcing (re)projections - Just make them faster!
Slow Event Sourcing (re)projections - Just make them faster!
 
50 things software teams should not do.pptx
50 things software teams should not do.pptx50 things software teams should not do.pptx
50 things software teams should not do.pptx
 
What is the right "unit" in unit testing and why it is not a class?
What is the right "unit" in unit testing and why it is not a class?What is the right "unit" in unit testing and why it is not a class?
What is the right "unit" in unit testing and why it is not a class?
 
A lab around the principles and practices for writing maintainable code
A lab around the principles and practices for writing maintainable codeA lab around the principles and practices for writing maintainable code
A lab around the principles and practices for writing maintainable code
 
How to Practice TDD Without Shooting Yourself in the Foot
How to Practice TDD Without Shooting Yourself in the FootHow to Practice TDD Without Shooting Yourself in the Foot
How to Practice TDD Without Shooting Yourself in the Foot
 
Decomposing the Monolith using modern-day .NET and a touch of microservices
Decomposing the Monolith using modern-day .NET and a touch of microservicesDecomposing the Monolith using modern-day .NET and a touch of microservices
Decomposing the Monolith using modern-day .NET and a touch of microservices
 
Event Sourcing from the Trenches (DDD Europe 2020)
Event Sourcing from the Trenches (DDD Europe 2020)Event Sourcing from the Trenches (DDD Europe 2020)
Event Sourcing from the Trenches (DDD Europe 2020)
 
Practical introduction to DDD, CQRS and Event Sourcing
Practical introduction to DDD, CQRS and Event SourcingPractical introduction to DDD, CQRS and Event Sourcing
Practical introduction to DDD, CQRS and Event Sourcing
 
How to practice TDD without shooting yourself in the foot
How to practice TDD without shooting yourself in the footHow to practice TDD without shooting yourself in the foot
How to practice TDD without shooting yourself in the foot
 
Decomposing the Monolith (Riga Dev Days 2019)
Decomposing the Monolith (Riga Dev Days 2019)Decomposing the Monolith (Riga Dev Days 2019)
Decomposing the Monolith (Riga Dev Days 2019)
 
A lab around the principles and practices for writing maintainable code (2019)
A lab around the principles and practices for writing maintainable code (2019)A lab around the principles and practices for writing maintainable code (2019)
A lab around the principles and practices for writing maintainable code (2019)
 
Lessons learned from two decades of professional software development
Lessons learned from two decades of professional software developmentLessons learned from two decades of professional software development
Lessons learned from two decades of professional software development
 
The Good, The Bad and The Ugly of Event Sourcing
The Good, The Bad and The Ugly of Event Sourcing The Good, The Bad and The Ugly of Event Sourcing
The Good, The Bad and The Ugly of Event Sourcing
 
Event Sourcing from the Trenches (with examples from .NET)
Event Sourcing from the Trenches (with examples from .NET)Event Sourcing from the Trenches (with examples from .NET)
Event Sourcing from the Trenches (with examples from .NET)
 
How To Practice TDD Without Shooting Yourself In The Foot
How To Practice TDD Without Shooting Yourself In The FootHow To Practice TDD Without Shooting Yourself In The Foot
How To Practice TDD Without Shooting Yourself In The Foot
 
Decomposing the monolith into embeddable microservices using OWIN, WebHooks, ...
Decomposing the monolith into embeddable microservices using OWIN, WebHooks, ...Decomposing the monolith into embeddable microservices using OWIN, WebHooks, ...
Decomposing the monolith into embeddable microservices using OWIN, WebHooks, ...
 

Dernier

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Dernier (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Automated ui testing with Specflow and WaTiN

  • 1. Automated Testing With SpecFlow and WaTiN Dennis Doomen © 2012 Aviva Solutions dennis.doomen@avivasolutions.nl 30 augustus 2012
  • 2. About Me • Principal Consultant • 15 years IT experience • C++ origins but C# since 2001 • Specialties • .NET Architecture • Scrum/XP • ALM • Speaker • Public initiatives • Silverlight Cookbook • C# Coding Guidelines • Fluent Assertions • Internet • www.dennisdoomen.net • DZone MVB • @ddoomen © 2012 Aviva Solutions Dennis Doomen 30 augustus 2012
  • 3. Challenges of User Interface Automation © 2012 Aviva Solutions 30 augustus 2012
  • 4. Levels of UI Automation Stability Functional User Workflow Technical Activity © 2012 Aviva Solutions 30 augustus 2012
  • 5. Smoke Specification Tests Performance by Example Tests Given a ninja has a third level black-belt When attacked by Chuck Norris Then the ninja should run for his life Living Behavior Driven Documentation Development Characteristics Tests © 2012 Aviva Solutions 30 augustus 2012
  • 6. ATDD combined with TDD Image from Growing Object-Oriented Software, Guided by Tests © 2012 Aviva Solutions 30 augustus 2012
  • 7. Deep Dive Demo © 2012 Aviva Solutions 30 augustus 2012
  • 8. Stability Gherkin Scenarios Functional Step Definitions User Workflow WaTiN Technical Activity © 2012 Aviva Solutions 30 augustus 2012
  • 9. Required Skills Scenarios Coding Skills Testing Skills Step Definitions Support Code WaTiN © 2012 Aviva Solutions 30 augustus 2012
  • 10. Features • Represent functional slices • Use Ubiquitous Language • Name liked a book or chapter • Organized by Epic User Stories Feature: Hosting Dinners In order to increase my business network As a entrepeneur I want to host dinners with interesting people from the community © 2012 Aviva Solutions 30 augustus 2012
  • 11. Scenarios • Key Examples of the Feature • Stakeholder perspective • UI agnostic • != test scripts • Manually executable • Grammatically correct Scenario: Attempting to host a dinner as a registered user Given a registered user When you want to host a dinner Then you should be able to schedule a dinner © 2012 Aviva Solutions 30 augustus 2012
  • 12. Steps • Global over all features • Don’t combine • Given = state • When = actions • Then = visible change Scenario: Attempting to host a dinner as a registered user Given a registered user When you want to host a dinner Then you should be able to schedule a dinner © 2012 Aviva Solutions 30 augustus 2012
  • 13. Step Definition • Grouped by entities, entity groups or domain concepts • Always use Page/Control pattern • No private helper methods © 2012 Aviva Solutions 30 augustus 2012
  • 14. Tables Scoped Scenario Bindings Outlines Hooks Advanced Topics Tags Step-Argument Conversion Step Definitions Data Sharing Assist Helpers © 2012 Aviva Solutions 30 augustus 2012
  • 15. Reading Material • Demo Code https://github.com/dennisdoomen/specflowdemo • The Cucumber Book http://pragprog.com/book/hwcuc/the-cucumber-book • The Secret Ninja Cucumber Scrolls http://cuke4ninja.com/toc.html • Death by UI Test Automation http://gojko.net/2010/07/29/the-sine-of-death-by-ui-test-automation/ • Code-to-Test Ratios, TDD and BDD http://www.infoq.com/articles/virtual-panel-tdd-bdd • Growing Object-Oriented Software, Guided by Tests http://www.amazon.com/Growing-Object-Oriented-Software-Guided- Tests/dp/0321503627 © 2012 Aviva Solutions 30 augustus 2012
  • 16. Email dennis.doomen@avivasolutions.nl Twitter @ddoomen Blog www.dennisdoomen.net © 2012 Aviva Solutions 30 augustus 2012