SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
Behavior-Driven Developmentand Automation Testing using Cucumber Framework. 
TrongBui 
KMS-Technologytrongbui@kms-technology.comhttp://www.kms-technology.com 
06|12|2014
About: KMS-Technology 
•Global Company 
–U.S. Company 
–Development Center in Ho Chi Minh City, Vietnam 
–Act local, think global (around-the-clock / distributed global team model) 
–480 resources globally 
•Proven and Experienced 
–Founded in January, 2009 
–100% of clients are reference-able 
–Microsoft Gold Partner 
•Value Driven Philosophy 
–Focus all aspects of business on delivering quality and value to our clients 
2 
BDD AUTOMATION TESTING WITH CUCUMBER
About: Trong Bui 
•QA Architect, Automation Test Lead at KMS-Technology 
•8 years experience in Software testing, including 4 years experience in Automation Test. 
•Test tools: Cucumber, Selenium. 
BDD AUTOMATION TESTING WITH CUCUMBER 3
WebinarAgenda: 
•Introduction 
•What is Behavior Driven Development (BDD) 
•What is Cucumber 
•BDD Automation Test with Cucumber 
•Cucumber Live Demo 
•Appendix: 
–UI Test Setup with Page Object Pattern 
–Cucumber Demo with Page Object Pattern 
BDD AUTOMATION TESTING WITH CUCUMBER 4
Introduction 
BDD AUTOMATION TESTING WITH CUCUMBER 5
Software Development Life Cycle 
BDD AUTOMATION TESTING WITH CUCUMBER 6
Classic example on collaboration skills 
BDD AUTOMATION TESTING WITH CUCUMBER 7
Skill gap and review dependency 
BDD AUTOMATION TESTING WITH CUCUMBER 8
Specific example of an requirement 
Feature: login to the system. 
Asa user, 
I want to login into the system when I provide username and password. 
Scenario:login successfully 
Giventhe login page is opening 
WhenI input username into the username textbox 
AndI input valid password into the password textbox 
AndI click Login button 
ThenI am on the Home page 
BDD AUTOMATION TESTING WITH CUCUMBER 9
and normal Automation Test 
@Test 
public void fb_login_test() throwsException { 
driver.get("https://www.facebook.com/"); 
driver.findElement(By.id("email")).clear(); 
driver.findElement(By.id("email")).sendKeys("bddtest@yahoo.com"); 
driver.findElement(By.id("pass")).clear(); 
driver.findElement(By.id("pass")).sendKeys("********"); 
driver.findElement(By.id("u_0_e")).click(); 
} 
BDD AUTOMATION TESTING WITH CUCUMBER 10
What is Behavior Driven Development (BDD) 
BDD AUTOMATION TESTING WITH CUCUMBER 11
Definition: 
Behavior-driven development (or BDD) is an agile software development technique that encourages collaboration between developers, QA and non-technical or business participants in a software project. 
BDD AUTOMATION TESTING WITH CUCUMBER 12
More specific: 
It’sallaboutGiven,WhenandThen–Mapseasilytouserstories 
Extends Test Driven Development (TDD) by utilizing natural language that non-technical stakeholders can understand. 
Encourages collaboration between Domain experts, Business Analysts, QA Engineers, Developers & Business Owners / Stakeholders 
Driven by Business Value and finally, with the aim of delivering "software that matters". 
BDD AUTOMATION TESTING WITH CUCUMBER 13
BDD scenario detail: 
A description of each specific case of the narrative. Such a scenario has the following structure: 
BDD AUTOMATION TESTING WITH CUCUMBER 14
Mapping User storiesto BDD scenarios: 
User story 
BDD scenario 
As a calculator user, I want to add two numbers so that I can do addition. 
Given I have two numbers 500 & 500 When I add them upThen I should get result 1000 
As a Math teacher, I want to automate marks sorting process so that I can declare top 5 in my class. 
Given a list of numbersWhen I sort the listThen the list will be in numerical order 
As a QA engineer, I want to check a critical feature so that I can do smoke test easily. 
Given I visit Google.comWhen I type ‘TestingWhiz' as a search string 
Then I should get search results matching TestingWhiz 
BDD AUTOMATION TESTING WITH CUCUMBER 15
Tooling principles: 
The tooling reads a specification document. 
The tooling directly understands completely formal parts of the ubiquitous language (such as the Given keyword in the example above). 
Each individual clause in a scenario is transformed into some sort of parameter for a test for the user story. 
The framework then executes the test for each scenario, with the parameters from that scenario. 
BDD AUTOMATION TESTING WITH CUCUMBER 16
What is Cucumber 
BDD AUTOMATION TESTING WITH CUCUMBER 17
Cucumber definition: 
From Wikipedia, Cucumberis asoftwaretool thatcomputer programmersuse for testing other software. It runs automatedacceptance testswritten in aBehavior-Driven Development(BDD) style. 
BDD AUTOMATION TESTING WITH CUCUMBER 18
How cucumber works: 
BDD AUTOMATION TESTING WITH CUCUMBER 19
BDD Automation Test with Cucumber 
BDD AUTOMATION TESTING WITH CUCUMBER 20
Example of BDD scenario: 
Feature: login to the system. 
Asa user, 
I want to login into the system when I provide username and password. 
Scenario:login successfully 
Giventhe login page is opening 
WhenI input username into the username textbox 
AndI input valid password into the password textbox 
AndI click Login button 
ThenI am on the Home page 
BDD AUTOMATION TESTING WITH CUCUMBER 21
BDD Scenario with parameters: 
BDD AUTOMATION TESTING WITH CUCUMBER 22
How Cucumber works: 
BDD AUTOMATION TESTING WITH CUCUMBER 
Given/^I launch "([^"]*)" page$/ do |page| 
visit(page) 
End 
When/^I fill in "([^"]*)" with "([^"]*)"$/ do |field, value| 
fill_infield, :with => value 
end 
23
BDD scenario with multi dataset: 
BDD AUTOMATION TESTING WITH CUCUMBER 24
Cucumber Live Demo 
BDD AUTOMATION TESTING WITH CUCUMBER 25
Environment setup: 
•Windows: 
–Install Ruby Installer 
•Download: http://rubyinstaller.org/downloads[Ruby 1.9.3-p125] 
•Install: rubyinstaller-xxx.exe 
•Verify: gem 
–Install Ruby DevKit 
•Download: http://rubyinstaller.org/downloads[DevKit-tdm-32- xxx] 
•Run: DevKit-tdm-32-xxx.exe 
•Generate config.ymlfile: ruby dk.rbinit 
•Install DevKit: ruby dk.rb 
•Test Installation:gem install rdiscount--platform=ruby 
BDD AUTOMATION TESTING WITH CUCUMBER 26
Q&A 
BDD AUTOMATION TESTING WITH CUCUMBER 27
THANK YOU 
© 2013 KMS Technology
APPENDIX 
APPENDIX –PAGE OBJECT PATTERN 29
UI Test Setup with Page Object Pattern 
APPENDIX –PAGE OBJECT PATTERN 30
PAGEOBJECTPATTERN 
Page Object Pattern is UI Automation Test good practice. 
It represents the screens of Web app as a series of objects and encapsulates the features represented by a page. 
It allows us to model the UI in our tests. 
A page object is an object-oriented class that serves as an interface to a page of your AUT. 
APPENDIX –PAGE OBJECT PATTERN 31
Page Object Pattern advantages: 
Reduces the duplication of code 
Makes tests more readable and robust 
Improves themaintainabilityof tests, particularly when there is frequent change in the AUT.(Useful in Agile methodology based projects) 
APPENDIX –PAGE OBJECT PATTERN 32
Cucumber Live Demo with Page Object Pattern 
APPENDIX –PAGE OBJECT PATTERN 33
References 
•Spring + Behavior-Driven-Development 
•Cukes.info 
•The Cucumber Book 
•Page Object Pattern 
BDD AUTOMATION TESTING WITH CUCUMBER 34

Weitere ähnliche Inhalte

Was ist angesagt?

Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Mindfire Solutions
 
Introducing BDD and TDD with Cucumber
Introducing BDD and TDD with CucumberIntroducing BDD and TDD with Cucumber
Introducing BDD and TDD with CucumberKnoldus Inc.
 
Introduction to Bdd and cucumber
Introduction to Bdd and cucumberIntroduction to Bdd and cucumber
Introduction to Bdd and cucumberNibu Baby
 
What Is Cucumber?
What Is Cucumber?What Is Cucumber?
What Is Cucumber?QATestLab
 
Cucumber presentation
Cucumber presentationCucumber presentation
Cucumber presentationAkhila B
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumberDaniel Kummer
 
An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)Suman Guha
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with seleniumTzirla Rozental
 
Test automation with Cucumber-JVM
Test automation with Cucumber-JVMTest automation with Cucumber-JVM
Test automation with Cucumber-JVMAlan Parkinson
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Lars Thorup
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and SeleniumKarapet Sarkisyan
 
Bdd – with cucumber and gherkin
Bdd – with cucumber and gherkinBdd – with cucumber and gherkin
Bdd – with cucumber and gherkinArati Joshi
 
Code coverage & tools
Code coverage & toolsCode coverage & tools
Code coverage & toolsRajesh Kumar
 
WebdriverIO: the Swiss Army Knife of testing
WebdriverIO: the Swiss Army Knife of testingWebdriverIO: the Swiss Army Knife of testing
WebdriverIO: the Swiss Army Knife of testingDaniel Chivescu
 

Was ist angesagt? (20)

BDD & Cucumber
BDD & CucumberBDD & Cucumber
BDD & Cucumber
 
Cucumber & gherkin language
Cucumber & gherkin languageCucumber & gherkin language
Cucumber & gherkin language
 
Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)
 
Cucumber presenation
Cucumber presenationCucumber presenation
Cucumber presenation
 
Introducing BDD and TDD with Cucumber
Introducing BDD and TDD with CucumberIntroducing BDD and TDD with Cucumber
Introducing BDD and TDD with Cucumber
 
Introduction to Bdd and cucumber
Introduction to Bdd and cucumberIntroduction to Bdd and cucumber
Introduction to Bdd and cucumber
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Gherkin /BDD intro
 
What Is Cucumber?
What Is Cucumber?What Is Cucumber?
What Is Cucumber?
 
Cucumber presentation
Cucumber presentationCucumber presentation
Cucumber presentation
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
 
An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
 
Test automation with Cucumber-JVM
Test automation with Cucumber-JVMTest automation with Cucumber-JVM
Test automation with Cucumber-JVM
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and Selenium
 
Bdd – with cucumber and gherkin
Bdd – with cucumber and gherkinBdd – with cucumber and gherkin
Bdd – with cucumber and gherkin
 
Cucumber ppt
Cucumber pptCucumber ppt
Cucumber ppt
 
Code coverage & tools
Code coverage & toolsCode coverage & tools
Code coverage & tools
 
WebdriverIO: the Swiss Army Knife of testing
WebdriverIO: the Swiss Army Knife of testingWebdriverIO: the Swiss Army Knife of testing
WebdriverIO: the Swiss Army Knife of testing
 
Cypress Automation
Cypress  AutomationCypress  Automation
Cypress Automation
 

Andere mochten auch

Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with CucumberBrandon Keepers
 
BBD Hands-on with Python. Practical Hands-on Workshop about "Behaviour Driven...
BBD Hands-on with Python. Practical Hands-on Workshop about "Behaviour Driven...BBD Hands-on with Python. Practical Hands-on Workshop about "Behaviour Driven...
BBD Hands-on with Python. Practical Hands-on Workshop about "Behaviour Driven...Hemmerling
 
Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...marcin_pajdzik
 
Making Watir and Cucumber an efficient tool for Web UI Automation
Making Watir and Cucumber an efficient tool for Web UI AutomationMaking Watir and Cucumber an efficient tool for Web UI Automation
Making Watir and Cucumber an efficient tool for Web UI AutomationRuslan Strazhnyk
 
Selenium Camp 2016
Selenium Camp 2016Selenium Camp 2016
Selenium Camp 2016Dan Cuellar
 
Trac/Subversion/JUnit/Maven/Jenkinsで構築する開発スタイル
Trac/Subversion/JUnit/Maven/Jenkinsで構築する開発スタイルTrac/Subversion/JUnit/Maven/Jenkinsで構築する開発スタイル
Trac/Subversion/JUnit/Maven/Jenkinsで構築する開発スタイルShuji Watanabe
 
Protractor for angularJS
Protractor for angularJSProtractor for angularJS
Protractor for angularJSKrishna Kumar
 
Product Owner Challenge - User Stories ready to play
Product Owner Challenge - User Stories ready to playProduct Owner Challenge - User Stories ready to play
Product Owner Challenge - User Stories ready to playMichael Tarnowski
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumDev9Com
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svnAnkur Goyal
 
Product Owner Challenge game
Product Owner Challenge game Product Owner Challenge game
Product Owner Challenge game Michael Tarnowski
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to ProtractorFlorian Fesseler
 
Continuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And DockerContinuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And DockerBarbara Gonzalez
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationRIA RUI Society
 

Andere mochten auch (20)

Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 
BBD Hands-on with Python. Practical Hands-on Workshop about "Behaviour Driven...
BBD Hands-on with Python. Practical Hands-on Workshop about "Behaviour Driven...BBD Hands-on with Python. Practical Hands-on Workshop about "Behaviour Driven...
BBD Hands-on with Python. Practical Hands-on Workshop about "Behaviour Driven...
 
Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...
 
Making Watir and Cucumber an efficient tool for Web UI Automation
Making Watir and Cucumber an efficient tool for Web UI AutomationMaking Watir and Cucumber an efficient tool for Web UI Automation
Making Watir and Cucumber an efficient tool for Web UI Automation
 
Selenium Camp 2016
Selenium Camp 2016Selenium Camp 2016
Selenium Camp 2016
 
Selenium
SeleniumSelenium
Selenium
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Trac/Subversion/JUnit/Maven/Jenkinsで構築する開発スタイル
Trac/Subversion/JUnit/Maven/Jenkinsで構築する開発スタイルTrac/Subversion/JUnit/Maven/Jenkinsで構築する開発スタイル
Trac/Subversion/JUnit/Maven/Jenkinsで構築する開発スタイル
 
Protractor overview
Protractor overviewProtractor overview
Protractor overview
 
Protractor training
Protractor trainingProtractor training
Protractor training
 
Protractor for angularJS
Protractor for angularJSProtractor for angularJS
Protractor for angularJS
 
Product Owner Challenge - User Stories ready to play
Product Owner Challenge - User Stories ready to playProduct Owner Challenge - User Stories ready to play
Product Owner Challenge - User Stories ready to play
 
Ant, Maven and Jenkins
Ant, Maven and JenkinsAnt, Maven and Jenkins
Ant, Maven and Jenkins
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and Selenium
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
 
Product Owner Challenge game
Product Owner Challenge game Product Owner Challenge game
Product Owner Challenge game
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
 
Continuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And DockerContinuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And Docker
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automation
 
Protractor: Tips & Tricks
Protractor: Tips & TricksProtractor: Tips & Tricks
Protractor: Tips & Tricks
 

Ähnlich wie Behavior-Driven Development and Automation Testing Using Cucumber Framework Webinar

Gitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a proGitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a prosparkfabrik
 
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF SummitOrtus Solutions, Corp
 
Continous UI testing with Espresso and Jenkins
Continous UI testing with Espresso and JenkinsContinous UI testing with Espresso and Jenkins
Continous UI testing with Espresso and JenkinsSylwester Madej
 
Advanced Coded UI Testing
Advanced Coded UI TestingAdvanced Coded UI Testing
Advanced Coded UI TestingShai Raiten
 
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...COMAQA.BY
 
3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION API3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION APIGavin Pickin
 
3 WAYS TO TEST YOUR COLDFUSION API -
3 WAYS TO TEST YOUR COLDFUSION API - 3 WAYS TO TEST YOUR COLDFUSION API -
3 WAYS TO TEST YOUR COLDFUSION API - Ortus Solutions, Corp
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
Ci/CD - Stop wasting time, Automate your deployments
Ci/CD  - Stop wasting time, Automate your deploymentsCi/CD  - Stop wasting time, Automate your deployments
Ci/CD - Stop wasting time, Automate your deploymentsJerry Jalava
 
Test Automation using Ruby
Test Automation using Ruby Test Automation using Ruby
Test Automation using Ruby Sla Va
 
Kubernetes best practices
Kubernetes best practicesKubernetes best practices
Kubernetes best practicesBill Liu
 
Continuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applicationsContinuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applicationsEvgeniy Kuzmin
 
Automated browser testing
Automated browser testingAutomated browser testing
Automated browser testingDavid Darke
 
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Building Blocks
 
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 courseNarayanan Palani
 
Automated CI with AEM Cloud service
Automated CI with AEM Cloud serviceAutomated CI with AEM Cloud service
Automated CI with AEM Cloud serviceJakub Wadolowski
 
Continuous Integration using Cruise Control
Continuous Integration using Cruise ControlContinuous Integration using Cruise Control
Continuous Integration using Cruise Controlelliando dias
 
Mihai Criveti - PyCon Ireland - Automate Everything
Mihai Criveti - PyCon Ireland - Automate EverythingMihai Criveti - PyCon Ireland - Automate Everything
Mihai Criveti - PyCon Ireland - Automate EverythingMihai Criveti
 

Ähnlich wie Behavior-Driven Development and Automation Testing Using Cucumber Framework Webinar (20)

Gitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a proGitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a pro
 
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
 
Cucumber_Training_ForQA
Cucumber_Training_ForQACucumber_Training_ForQA
Cucumber_Training_ForQA
 
Continous UI testing with Espresso and Jenkins
Continous UI testing with Espresso and JenkinsContinous UI testing with Espresso and Jenkins
Continous UI testing with Espresso and Jenkins
 
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
 
Advanced Coded UI Testing
Advanced Coded UI TestingAdvanced Coded UI Testing
Advanced Coded UI Testing
 
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
 
3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION API3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION API
 
3 WAYS TO TEST YOUR COLDFUSION API -
3 WAYS TO TEST YOUR COLDFUSION API - 3 WAYS TO TEST YOUR COLDFUSION API -
3 WAYS TO TEST YOUR COLDFUSION API -
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Ci/CD - Stop wasting time, Automate your deployments
Ci/CD  - Stop wasting time, Automate your deploymentsCi/CD  - Stop wasting time, Automate your deployments
Ci/CD - Stop wasting time, Automate your deployments
 
Test Automation using Ruby
Test Automation using Ruby Test Automation using Ruby
Test Automation using Ruby
 
Kubernetes best practices
Kubernetes best practicesKubernetes best practices
Kubernetes best practices
 
Continuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applicationsContinuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applications
 
Automated browser testing
Automated browser testingAutomated browser testing
Automated browser testing
 
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
 
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
 
Automated CI with AEM Cloud service
Automated CI with AEM Cloud serviceAutomated CI with AEM Cloud service
Automated CI with AEM Cloud service
 
Continuous Integration using Cruise Control
Continuous Integration using Cruise ControlContinuous Integration using Cruise Control
Continuous Integration using Cruise Control
 
Mihai Criveti - PyCon Ireland - Automate Everything
Mihai Criveti - PyCon Ireland - Automate EverythingMihai Criveti - PyCon Ireland - Automate Everything
Mihai Criveti - PyCon Ireland - Automate Everything
 

Mehr von KMS Technology

A journey to a Full Stack Tester
A journey to a Full Stack Tester A journey to a Full Stack Tester
A journey to a Full Stack Tester KMS Technology
 
React & Redux, how to scale?
React & Redux, how to scale?React & Redux, how to scale?
React & Redux, how to scale?KMS Technology
 
Common design principles and design patterns in automation testing
Common design principles and design patterns in automation testingCommon design principles and design patterns in automation testing
Common design principles and design patterns in automation testingKMS Technology
 
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOpsKMS Technology
 
What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?KMS Technology
 
JavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy LanguageJavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy LanguageKMS Technology
 
JavaScript No longer A “toy” Language
JavaScript No longer A “toy” LanguageJavaScript No longer A “toy” Language
JavaScript No longer A “toy” LanguageKMS Technology
 
Preparations For A Successful Interview
Preparations For A Successful InterviewPreparations For A Successful Interview
Preparations For A Successful InterviewKMS Technology
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page ApplicationKMS Technology
 
AWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic BeanstalkAWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic BeanstalkKMS Technology
 
Technology Application Development Trends For IT Students
Technology Application Development Trends For IT StudentsTechnology Application Development Trends For IT Students
Technology Application Development Trends For IT StudentsKMS Technology
 
Contributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project SeminarContributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project SeminarKMS Technology
 
Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014KMS Technology
 
Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014KMS Technology
 
Cross-platform Mobile Development with C# and Xamarin Webinar
Cross-platform Mobile Development with C# and Xamarin WebinarCross-platform Mobile Development with C# and Xamarin Webinar
Cross-platform Mobile Development with C# and Xamarin WebinarKMS Technology
 
Software Testing Process & Trend
Software Testing Process & TrendSoftware Testing Process & Trend
Software Testing Process & TrendKMS Technology
 

Mehr von KMS Technology (20)

A journey to a Full Stack Tester
A journey to a Full Stack Tester A journey to a Full Stack Tester
A journey to a Full Stack Tester
 
React & Redux, how to scale?
React & Redux, how to scale?React & Redux, how to scale?
React & Redux, how to scale?
 
Sexy React Stack
Sexy React StackSexy React Stack
Sexy React Stack
 
Common design principles and design patterns in automation testing
Common design principles and design patterns in automation testingCommon design principles and design patterns in automation testing
Common design principles and design patterns in automation testing
 
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
 
KMSNext Roadmap
KMSNext RoadmapKMSNext Roadmap
KMSNext Roadmap
 
KMS Introduction
KMS IntroductionKMS Introduction
KMS Introduction
 
What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?
 
JavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy LanguageJavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy Language
 
JavaScript No longer A “toy” Language
JavaScript No longer A “toy” LanguageJavaScript No longer A “toy” Language
JavaScript No longer A “toy” Language
 
Preparations For A Successful Interview
Preparations For A Successful InterviewPreparations For A Successful Interview
Preparations For A Successful Interview
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page Application
 
AWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic BeanstalkAWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic Beanstalk
 
KMS Introduction
KMS IntroductionKMS Introduction
KMS Introduction
 
Technology Application Development Trends For IT Students
Technology Application Development Trends For IT StudentsTechnology Application Development Trends For IT Students
Technology Application Development Trends For IT Students
 
Contributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project SeminarContributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project Seminar
 
Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014
 
Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014
 
Cross-platform Mobile Development with C# and Xamarin Webinar
Cross-platform Mobile Development with C# and Xamarin WebinarCross-platform Mobile Development with C# and Xamarin Webinar
Cross-platform Mobile Development with C# and Xamarin Webinar
 
Software Testing Process & Trend
Software Testing Process & TrendSoftware Testing Process & Trend
Software Testing Process & Trend
 

Kürzlich hochgeladen

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 

Behavior-Driven Development and Automation Testing Using Cucumber Framework Webinar

  • 1. Behavior-Driven Developmentand Automation Testing using Cucumber Framework. TrongBui KMS-Technologytrongbui@kms-technology.comhttp://www.kms-technology.com 06|12|2014
  • 2. About: KMS-Technology •Global Company –U.S. Company –Development Center in Ho Chi Minh City, Vietnam –Act local, think global (around-the-clock / distributed global team model) –480 resources globally •Proven and Experienced –Founded in January, 2009 –100% of clients are reference-able –Microsoft Gold Partner •Value Driven Philosophy –Focus all aspects of business on delivering quality and value to our clients 2 BDD AUTOMATION TESTING WITH CUCUMBER
  • 3. About: Trong Bui •QA Architect, Automation Test Lead at KMS-Technology •8 years experience in Software testing, including 4 years experience in Automation Test. •Test tools: Cucumber, Selenium. BDD AUTOMATION TESTING WITH CUCUMBER 3
  • 4. WebinarAgenda: •Introduction •What is Behavior Driven Development (BDD) •What is Cucumber •BDD Automation Test with Cucumber •Cucumber Live Demo •Appendix: –UI Test Setup with Page Object Pattern –Cucumber Demo with Page Object Pattern BDD AUTOMATION TESTING WITH CUCUMBER 4
  • 5. Introduction BDD AUTOMATION TESTING WITH CUCUMBER 5
  • 6. Software Development Life Cycle BDD AUTOMATION TESTING WITH CUCUMBER 6
  • 7. Classic example on collaboration skills BDD AUTOMATION TESTING WITH CUCUMBER 7
  • 8. Skill gap and review dependency BDD AUTOMATION TESTING WITH CUCUMBER 8
  • 9. Specific example of an requirement Feature: login to the system. Asa user, I want to login into the system when I provide username and password. Scenario:login successfully Giventhe login page is opening WhenI input username into the username textbox AndI input valid password into the password textbox AndI click Login button ThenI am on the Home page BDD AUTOMATION TESTING WITH CUCUMBER 9
  • 10. and normal Automation Test @Test public void fb_login_test() throwsException { driver.get("https://www.facebook.com/"); driver.findElement(By.id("email")).clear(); driver.findElement(By.id("email")).sendKeys("bddtest@yahoo.com"); driver.findElement(By.id("pass")).clear(); driver.findElement(By.id("pass")).sendKeys("********"); driver.findElement(By.id("u_0_e")).click(); } BDD AUTOMATION TESTING WITH CUCUMBER 10
  • 11. What is Behavior Driven Development (BDD) BDD AUTOMATION TESTING WITH CUCUMBER 11
  • 12. Definition: Behavior-driven development (or BDD) is an agile software development technique that encourages collaboration between developers, QA and non-technical or business participants in a software project. BDD AUTOMATION TESTING WITH CUCUMBER 12
  • 13. More specific: It’sallaboutGiven,WhenandThen–Mapseasilytouserstories Extends Test Driven Development (TDD) by utilizing natural language that non-technical stakeholders can understand. Encourages collaboration between Domain experts, Business Analysts, QA Engineers, Developers & Business Owners / Stakeholders Driven by Business Value and finally, with the aim of delivering "software that matters". BDD AUTOMATION TESTING WITH CUCUMBER 13
  • 14. BDD scenario detail: A description of each specific case of the narrative. Such a scenario has the following structure: BDD AUTOMATION TESTING WITH CUCUMBER 14
  • 15. Mapping User storiesto BDD scenarios: User story BDD scenario As a calculator user, I want to add two numbers so that I can do addition. Given I have two numbers 500 & 500 When I add them upThen I should get result 1000 As a Math teacher, I want to automate marks sorting process so that I can declare top 5 in my class. Given a list of numbersWhen I sort the listThen the list will be in numerical order As a QA engineer, I want to check a critical feature so that I can do smoke test easily. Given I visit Google.comWhen I type ‘TestingWhiz' as a search string Then I should get search results matching TestingWhiz BDD AUTOMATION TESTING WITH CUCUMBER 15
  • 16. Tooling principles: The tooling reads a specification document. The tooling directly understands completely formal parts of the ubiquitous language (such as the Given keyword in the example above). Each individual clause in a scenario is transformed into some sort of parameter for a test for the user story. The framework then executes the test for each scenario, with the parameters from that scenario. BDD AUTOMATION TESTING WITH CUCUMBER 16
  • 17. What is Cucumber BDD AUTOMATION TESTING WITH CUCUMBER 17
  • 18. Cucumber definition: From Wikipedia, Cucumberis asoftwaretool thatcomputer programmersuse for testing other software. It runs automatedacceptance testswritten in aBehavior-Driven Development(BDD) style. BDD AUTOMATION TESTING WITH CUCUMBER 18
  • 19. How cucumber works: BDD AUTOMATION TESTING WITH CUCUMBER 19
  • 20. BDD Automation Test with Cucumber BDD AUTOMATION TESTING WITH CUCUMBER 20
  • 21. Example of BDD scenario: Feature: login to the system. Asa user, I want to login into the system when I provide username and password. Scenario:login successfully Giventhe login page is opening WhenI input username into the username textbox AndI input valid password into the password textbox AndI click Login button ThenI am on the Home page BDD AUTOMATION TESTING WITH CUCUMBER 21
  • 22. BDD Scenario with parameters: BDD AUTOMATION TESTING WITH CUCUMBER 22
  • 23. How Cucumber works: BDD AUTOMATION TESTING WITH CUCUMBER Given/^I launch "([^"]*)" page$/ do |page| visit(page) End When/^I fill in "([^"]*)" with "([^"]*)"$/ do |field, value| fill_infield, :with => value end 23
  • 24. BDD scenario with multi dataset: BDD AUTOMATION TESTING WITH CUCUMBER 24
  • 25. Cucumber Live Demo BDD AUTOMATION TESTING WITH CUCUMBER 25
  • 26. Environment setup: •Windows: –Install Ruby Installer •Download: http://rubyinstaller.org/downloads[Ruby 1.9.3-p125] •Install: rubyinstaller-xxx.exe •Verify: gem –Install Ruby DevKit •Download: http://rubyinstaller.org/downloads[DevKit-tdm-32- xxx] •Run: DevKit-tdm-32-xxx.exe •Generate config.ymlfile: ruby dk.rbinit •Install DevKit: ruby dk.rb •Test Installation:gem install rdiscount--platform=ruby BDD AUTOMATION TESTING WITH CUCUMBER 26
  • 27. Q&A BDD AUTOMATION TESTING WITH CUCUMBER 27
  • 28. THANK YOU © 2013 KMS Technology
  • 29. APPENDIX APPENDIX –PAGE OBJECT PATTERN 29
  • 30. UI Test Setup with Page Object Pattern APPENDIX –PAGE OBJECT PATTERN 30
  • 31. PAGEOBJECTPATTERN Page Object Pattern is UI Automation Test good practice. It represents the screens of Web app as a series of objects and encapsulates the features represented by a page. It allows us to model the UI in our tests. A page object is an object-oriented class that serves as an interface to a page of your AUT. APPENDIX –PAGE OBJECT PATTERN 31
  • 32. Page Object Pattern advantages: Reduces the duplication of code Makes tests more readable and robust Improves themaintainabilityof tests, particularly when there is frequent change in the AUT.(Useful in Agile methodology based projects) APPENDIX –PAGE OBJECT PATTERN 32
  • 33. Cucumber Live Demo with Page Object Pattern APPENDIX –PAGE OBJECT PATTERN 33
  • 34. References •Spring + Behavior-Driven-Development •Cukes.info •The Cucumber Book •Page Object Pattern BDD AUTOMATION TESTING WITH CUCUMBER 34