SlideShare a Scribd company logo
1 of 22
Behavior Driven GUI Testing
STUGHH 2015
by Reginald Stadlbauer
About me
 Name: Reginald Stadlbauer
 Company: froglogic GmbH
 Position: co-founder and CEO
 Worked as Software Engineer at Trolltech and the KDE project
About froglogic
 HQ: Hamburg
 Founded: 2003
 US presence since 2008
 Product focus on Squish
- Squish GUI Tester (Cross-Platform/Cross-Technology GUI Test Automation)
- Squish Coco (C, C++ and C# Code Coverage)
 More than 3.000 customers world-wide
Overview
 What is BDD and TDD
 Automating a Behavior Driven Test
 Live Demo & Conclusion
What is BDD / BDT?
“BDD is a second-generation, outside-in, pull-based, multiple-stakeholder, multiple-scale,
high-automation, agile methodology. It describes a cycle of interactions with well-defined
outputs, resulting in the delivery of working, tested software that matters.” - Dan North
http://en.wikipedia.org/wiki/Behavior-driven_development
OR...
What is BDD / BDT?
 Based on Test Driven Development
- Write (failing) test
- Implement feature until test passes
- Unit-Test level granularity (inside-out)
 But
- Focus on application's behavior and specification
- Description in a human-readable DSL (e.g. Gherkin)
- Less focus on implementation details
Versatile usage of Feature Files
 User story / feature specification
 Communicate with customer / users
 Documentation of acceptance test
 Sequence to walk through for manual tests
 Storyboard for automation of tests
Why BDD/BDT
 “Test first” development on a higher level
 Clearly separate test logic from implementation
 Allow non-programmers to define features & tests
 Have a common, single language two communicate
What is BDD / BDT – Unit Conversion
What is BDD / BDT – Unit Conversion
Feature: Valid conversion
Scenario: Convert meter in centimeter
Given the Unit Converter is running
When I enter 378.9
And choose to convert from "m"
And choose to convert to "cm"
And click Convert
Then 37890 should be displayed in the result field
Feature
File
(Gherkin)
What is BDD / BDT – Unit Conversion
Feature: Invalid conversion
Scenario: Mix units
Given the Unit Converter is running
When I enter 378.9
And choose to convert from "m"
And choose to convert to "kg"
And click Convert
Then ERROR should be displayed in the result field
And "Unit type mismatch: Length vs. Weight." should be displayed in red
Feature
File
(Gherkin)
What is BDD / BDT – The Process
Write a failing
Feature Test
Make
Feature Test
pass
Implement/
Refactor
Code
Test
Manually Automated
Automating a Behavior Driven GUI Test
 Requirements
- BDT framework
- Test Automation framework (GUI test tool, ...)
- Glue between both
BDT Framework – Generate Skeletons
 Parse feature files
 Generate step definition skeletons (functions and annotations) in
preferred language
Test.feature
Feature: Valid conversion
Scenario: Convert meter in centimeter
Given the Unit Converter is running
When I enter 378.9
....
Test.py
@Step("Given the Unit Converter is running")
def step(context):
test.warning("Implement me”)
@Step("When I enter 378.9")
def step(context):
test.warning("Implement me”)
BDT Framework – Run Feature Files
 Parse feature files
 Execute feature files by mapping to steps to step definitions (functions)
 Reporting
Test.feature
Feature: Valid conversion
Scenario: Convert meter in centimeter
Given the Unit Converter is running
When I enter 378.9
....
Test.py
@Step("Given the Unit Converter is running")
def step(context):
[...]
@Step("When I enter 378.9")
def step(context):
[...]
Test Automation framework
 Support the specific UI technology of Application
 Support the scripting/programming language of the BDT framework
 Tooling for convenient test creation, maintenance and debugging
Test.py
@Step("Given the Unit Converter is running")
def step(context):
startApplication("UnitConverter”)
@Step("When I enter 378.9")
def step(context):
click("FromField”)
typeText("378.9”)
Integrating BDT and Test Automation
frameworks
 Need to “talk the same language”
 Reporting
 Debugging
BDT Frameworks
 Cucumber
 JBehave
 Behave
 SpecFlow
 RSpec
 Lettuce
 Squish GUI Tester
 ...
Test Automation frameworks
 CppUnit
 GoogleTest
 xUnit
 NUnit
 JUnit
 Squish GUI Tester
 HP QTP
 Rational Functional Tester
 Selenium
 ...
Live Demos
 BDD GUI test for cross-platform Unit Converter
- Valid conversion
- Invalid conversion
- Passing parameters
- Scenario Outline
Q & A
Contact me reggie@froglogic.com
Free and supported trial of Squish at http://www.froglogic.com/evaluate
About Squish GUI Tester
 Cross-Platform / Cross-GUI-Technology Test Automation
- Windows, Linux, Mac OS X, Unix, Embedded OSes, RTOSes, Mobile
- Java (Swing/AWT, SWT/RCP, JavaFx), Qt/QML/QtQuick, Web, MFC,
WinForms, WPF, iOS, Cocoa, Carbon, Android, Tk, Flex, …
 Object-based GUI object identification
 Record & replay
 Powerful scripting (JavaScript, Python, Ruby, Tcl, Perl)
 Eclipse-based IDE
 Built-in BDD framework and support
 Batch-testing via command-line tools
 Remote/distributed testing architecture
 Integrations: Microsoft ALM, HP QC/ALM, Rational RQM, Seapine TCM,
SpiraTest, MKS, XStudio, Jenkins, Hudson, TeamCity, Bamboo, Robot
Framework, JUnit, Maven, …

More Related Content

What's hot

Test Driven Development in CQ5/AEM
Test Driven Development in CQ5/AEMTest Driven Development in CQ5/AEM
Test Driven Development in CQ5/AEMSagar Sane
 
Bdd – with cucumber and gherkin
Bdd – with cucumber and gherkinBdd – with cucumber and gherkin
Bdd – with cucumber and gherkinArati Joshi
 
froglogic Squish GUI Tester Presentation
froglogic Squish GUI Tester Presentationfroglogic Squish GUI Tester Presentation
froglogic Squish GUI Tester PresentationReginald Stadlbauer
 
Acceptance Test Driven Development With Spec Flow And Friends
Acceptance Test Driven Development With Spec Flow And FriendsAcceptance Test Driven Development With Spec Flow And Friends
Acceptance Test Driven Development With Spec Flow And FriendsChristopher Bartling
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkSteve Zhang
 
Test automation with cucumber jvm
Test automation with cucumber jvmTest automation with cucumber jvm
Test automation with cucumber jvmNibu Baby
 
Integration of automation framework with ci tools
Integration of automation framework with ci toolsIntegration of automation framework with ci tools
Integration of automation framework with ci toolsvodQA
 
Agile Development in .NET
Agile Development in .NETAgile Development in .NET
Agile Development in .NETdanhermes
 
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019Paulo Clavijo
 
Yet Another Continuous Integration Story
Yet Another Continuous Integration StoryYet Another Continuous Integration Story
Yet Another Continuous Integration StoryAnton Serdyuk
 
The Hitchhiker's Guide to Servo Contributor [COSCUP 2020]
The Hitchhiker's Guide to Servo Contributor [COSCUP 2020]The Hitchhiker's Guide to Servo Contributor [COSCUP 2020]
The Hitchhiker's Guide to Servo Contributor [COSCUP 2020]Cheng You Bai
 
Introduction to lambda behave
Introduction to lambda behaveIntroduction to lambda behave
Introduction to lambda behaveRichardWarburton
 
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)Alvaro Sanchez-Mariscal
 
21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir
21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir
21o. RubyFloripa - Maintaining legacy Rails app and introducing ElixirWeverton Timoteo
 
Refactoring Legacy Code
Refactoring Legacy CodeRefactoring Legacy Code
Refactoring Legacy CodeAdam Culp
 

What's hot (20)

Test Driven Development in CQ5/AEM
Test Driven Development in CQ5/AEMTest Driven Development in CQ5/AEM
Test Driven Development in CQ5/AEM
 
Bdd and spec flow
Bdd and spec flowBdd and spec flow
Bdd and spec flow
 
Bdd – with cucumber and gherkin
Bdd – with cucumber and gherkinBdd – with cucumber and gherkin
Bdd – with cucumber and gherkin
 
froglogic Squish GUI Tester Presentation
froglogic Squish GUI Tester Presentationfroglogic Squish GUI Tester Presentation
froglogic Squish GUI Tester Presentation
 
Acceptance Test Driven Development With Spec Flow And Friends
Acceptance Test Driven Development With Spec Flow And FriendsAcceptance Test Driven Development With Spec Flow And Friends
Acceptance Test Driven Development With Spec Flow And Friends
 
Cucumber BDD
Cucumber BDDCucumber BDD
Cucumber BDD
 
Cucumber_Training_ForQA
Cucumber_Training_ForQACucumber_Training_ForQA
Cucumber_Training_ForQA
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot Framework
 
Test automation with cucumber jvm
Test automation with cucumber jvmTest automation with cucumber jvm
Test automation with cucumber jvm
 
Integration of automation framework with ci tools
Integration of automation framework with ci toolsIntegration of automation framework with ci tools
Integration of automation framework with ci tools
 
Cucumber in Practice(en)
Cucumber in Practice(en)Cucumber in Practice(en)
Cucumber in Practice(en)
 
Agile Development in .NET
Agile Development in .NETAgile Development in .NET
Agile Development in .NET
 
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019
 
Yet Another Continuous Integration Story
Yet Another Continuous Integration StoryYet Another Continuous Integration Story
Yet Another Continuous Integration Story
 
TDD & BDD
TDD & BDDTDD & BDD
TDD & BDD
 
The Hitchhiker's Guide to Servo Contributor [COSCUP 2020]
The Hitchhiker's Guide to Servo Contributor [COSCUP 2020]The Hitchhiker's Guide to Servo Contributor [COSCUP 2020]
The Hitchhiker's Guide to Servo Contributor [COSCUP 2020]
 
Introduction to lambda behave
Introduction to lambda behaveIntroduction to lambda behave
Introduction to lambda behave
 
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
 
21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir
21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir
21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir
 
Refactoring Legacy Code
Refactoring Legacy CodeRefactoring Legacy Code
Refactoring Legacy Code
 

Similar to Behavior Driven GUI Testing

Behavior Driven GUI Testing
Behavior Driven GUI TestingBehavior Driven GUI Testing
Behavior Driven GUI TestingAmanda Burma
 
"Production Driven Development", Serhii Kalinets
"Production Driven Development", Serhii Kalinets"Production Driven Development", Serhii Kalinets
"Production Driven Development", Serhii KalinetsFwdays
 
An Introduction to Microservices
An Introduction to MicroservicesAn Introduction to Microservices
An Introduction to MicroservicesAd van der Veer
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
Behavior Driven Testing with SpecFlow
Behavior Driven Testing with SpecFlowBehavior Driven Testing with SpecFlow
Behavior Driven Testing with SpecFlowRachid Kherrazi
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power pointjustmeanscsr
 
2018 Cisco DevNet Create : How to Treat a Network as a Container
2018 Cisco DevNet Create : How to Treat a Network as a Container2018 Cisco DevNet Create : How to Treat a Network as a Container
2018 Cisco DevNet Create : How to Treat a Network as a ContainerRosemary Wang
 
Bdd Net Frameworks
Bdd Net FrameworksBdd Net Frameworks
Bdd Net Frameworkshdgarcia
 
Continuous Integration to Shift Left Testing Across the Enterprise Stack
Continuous Integration to Shift Left Testing Across the Enterprise StackContinuous Integration to Shift Left Testing Across the Enterprise Stack
Continuous Integration to Shift Left Testing Across the Enterprise StackDevOps.com
 
Testing with test_complete
Testing with test_completeTesting with test_complete
Testing with test_completebinuiweb
 
Continuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon OttoContinuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon OttoPeter Bittner
 
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14hYuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14hYury M
 
Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1willmation
 
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
 
Tech Days 2015: Model Based Development with QGen
Tech Days 2015: Model Based Development with QGenTech Days 2015: Model Based Development with QGen
Tech Days 2015: Model Based Development with QGenAdaCore
 
Problem Determination Tools
Problem Determination ToolsProblem Determination Tools
Problem Determination ToolsCICS ROADSHOW
 
Ugif 10 2012 lycia2 introduction in 45 minutes
Ugif 10 2012 lycia2 introduction in 45 minutesUgif 10 2012 lycia2 introduction in 45 minutes
Ugif 10 2012 lycia2 introduction in 45 minutesUGIF
 
Gradle(the innovation continues)
Gradle(the innovation continues)Gradle(the innovation continues)
Gradle(the innovation continues)Sejong Park
 

Similar to Behavior Driven GUI Testing (20)

Behavior Driven GUI Testing
Behavior Driven GUI TestingBehavior Driven GUI Testing
Behavior Driven GUI Testing
 
Testing 1, 2, 3, ...
Testing 1, 2, 3, ... Testing 1, 2, 3, ...
Testing 1, 2, 3, ...
 
"Production Driven Development", Serhii Kalinets
"Production Driven Development", Serhii Kalinets"Production Driven Development", Serhii Kalinets
"Production Driven Development", Serhii Kalinets
 
Ab initio training Ab-initio Architecture
Ab initio training Ab-initio ArchitectureAb initio training Ab-initio Architecture
Ab initio training Ab-initio Architecture
 
An Introduction to Microservices
An Introduction to MicroservicesAn Introduction to Microservices
An Introduction to Microservices
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Behavior Driven Testing with SpecFlow
Behavior Driven Testing with SpecFlowBehavior Driven Testing with SpecFlow
Behavior Driven Testing with SpecFlow
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
2018 Cisco DevNet Create : How to Treat a Network as a Container
2018 Cisco DevNet Create : How to Treat a Network as a Container2018 Cisco DevNet Create : How to Treat a Network as a Container
2018 Cisco DevNet Create : How to Treat a Network as a Container
 
Bdd Net Frameworks
Bdd Net FrameworksBdd Net Frameworks
Bdd Net Frameworks
 
Continuous Integration to Shift Left Testing Across the Enterprise Stack
Continuous Integration to Shift Left Testing Across the Enterprise StackContinuous Integration to Shift Left Testing Across the Enterprise Stack
Continuous Integration to Shift Left Testing Across the Enterprise Stack
 
Testing with test_complete
Testing with test_completeTesting with test_complete
Testing with test_complete
 
Continuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon OttoContinuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon Otto
 
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14hYuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
 
Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1
 
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
 
Tech Days 2015: Model Based Development with QGen
Tech Days 2015: Model Based Development with QGenTech Days 2015: Model Based Development with QGen
Tech Days 2015: Model Based Development with QGen
 
Problem Determination Tools
Problem Determination ToolsProblem Determination Tools
Problem Determination Tools
 
Ugif 10 2012 lycia2 introduction in 45 minutes
Ugif 10 2012 lycia2 introduction in 45 minutesUgif 10 2012 lycia2 introduction in 45 minutes
Ugif 10 2012 lycia2 introduction in 45 minutes
 
Gradle(the innovation continues)
Gradle(the innovation continues)Gradle(the innovation continues)
Gradle(the innovation continues)
 

Recently uploaded

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 

Recently uploaded (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 

Behavior Driven GUI Testing

  • 1. Behavior Driven GUI Testing STUGHH 2015 by Reginald Stadlbauer
  • 2. About me  Name: Reginald Stadlbauer  Company: froglogic GmbH  Position: co-founder and CEO  Worked as Software Engineer at Trolltech and the KDE project
  • 3. About froglogic  HQ: Hamburg  Founded: 2003  US presence since 2008  Product focus on Squish - Squish GUI Tester (Cross-Platform/Cross-Technology GUI Test Automation) - Squish Coco (C, C++ and C# Code Coverage)  More than 3.000 customers world-wide
  • 4. Overview  What is BDD and TDD  Automating a Behavior Driven Test  Live Demo & Conclusion
  • 5. What is BDD / BDT? “BDD is a second-generation, outside-in, pull-based, multiple-stakeholder, multiple-scale, high-automation, agile methodology. It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working, tested software that matters.” - Dan North http://en.wikipedia.org/wiki/Behavior-driven_development OR...
  • 6. What is BDD / BDT?  Based on Test Driven Development - Write (failing) test - Implement feature until test passes - Unit-Test level granularity (inside-out)  But - Focus on application's behavior and specification - Description in a human-readable DSL (e.g. Gherkin) - Less focus on implementation details
  • 7. Versatile usage of Feature Files  User story / feature specification  Communicate with customer / users  Documentation of acceptance test  Sequence to walk through for manual tests  Storyboard for automation of tests
  • 8. Why BDD/BDT  “Test first” development on a higher level  Clearly separate test logic from implementation  Allow non-programmers to define features & tests  Have a common, single language two communicate
  • 9. What is BDD / BDT – Unit Conversion
  • 10. What is BDD / BDT – Unit Conversion Feature: Valid conversion Scenario: Convert meter in centimeter Given the Unit Converter is running When I enter 378.9 And choose to convert from "m" And choose to convert to "cm" And click Convert Then 37890 should be displayed in the result field Feature File (Gherkin)
  • 11. What is BDD / BDT – Unit Conversion Feature: Invalid conversion Scenario: Mix units Given the Unit Converter is running When I enter 378.9 And choose to convert from "m" And choose to convert to "kg" And click Convert Then ERROR should be displayed in the result field And "Unit type mismatch: Length vs. Weight." should be displayed in red Feature File (Gherkin)
  • 12. What is BDD / BDT – The Process Write a failing Feature Test Make Feature Test pass Implement/ Refactor Code Test Manually Automated
  • 13. Automating a Behavior Driven GUI Test  Requirements - BDT framework - Test Automation framework (GUI test tool, ...) - Glue between both
  • 14. BDT Framework – Generate Skeletons  Parse feature files  Generate step definition skeletons (functions and annotations) in preferred language Test.feature Feature: Valid conversion Scenario: Convert meter in centimeter Given the Unit Converter is running When I enter 378.9 .... Test.py @Step("Given the Unit Converter is running") def step(context): test.warning("Implement me”) @Step("When I enter 378.9") def step(context): test.warning("Implement me”)
  • 15. BDT Framework – Run Feature Files  Parse feature files  Execute feature files by mapping to steps to step definitions (functions)  Reporting Test.feature Feature: Valid conversion Scenario: Convert meter in centimeter Given the Unit Converter is running When I enter 378.9 .... Test.py @Step("Given the Unit Converter is running") def step(context): [...] @Step("When I enter 378.9") def step(context): [...]
  • 16. Test Automation framework  Support the specific UI technology of Application  Support the scripting/programming language of the BDT framework  Tooling for convenient test creation, maintenance and debugging Test.py @Step("Given the Unit Converter is running") def step(context): startApplication("UnitConverter”) @Step("When I enter 378.9") def step(context): click("FromField”) typeText("378.9”)
  • 17. Integrating BDT and Test Automation frameworks  Need to “talk the same language”  Reporting  Debugging
  • 18. BDT Frameworks  Cucumber  JBehave  Behave  SpecFlow  RSpec  Lettuce  Squish GUI Tester  ...
  • 19. Test Automation frameworks  CppUnit  GoogleTest  xUnit  NUnit  JUnit  Squish GUI Tester  HP QTP  Rational Functional Tester  Selenium  ...
  • 20. Live Demos  BDD GUI test for cross-platform Unit Converter - Valid conversion - Invalid conversion - Passing parameters - Scenario Outline
  • 21. Q & A Contact me reggie@froglogic.com Free and supported trial of Squish at http://www.froglogic.com/evaluate
  • 22. About Squish GUI Tester  Cross-Platform / Cross-GUI-Technology Test Automation - Windows, Linux, Mac OS X, Unix, Embedded OSes, RTOSes, Mobile - Java (Swing/AWT, SWT/RCP, JavaFx), Qt/QML/QtQuick, Web, MFC, WinForms, WPF, iOS, Cocoa, Carbon, Android, Tk, Flex, …  Object-based GUI object identification  Record & replay  Powerful scripting (JavaScript, Python, Ruby, Tcl, Perl)  Eclipse-based IDE  Built-in BDD framework and support  Batch-testing via command-line tools  Remote/distributed testing architecture  Integrations: Microsoft ALM, HP QC/ALM, Rational RQM, Seapine TCM, SpiraTest, MKS, XStudio, Jenkins, Hudson, TeamCity, Bamboo, Robot Framework, JUnit, Maven, …