SlideShare una empresa de Scribd logo
1 de 24
Test Automation
Using Cucumber and Calabash
Xavier Yin 201/01/15
Outline
 Introduction
– Testing
– Comparisons
– Automation Testing Tool
– Implement Steps
 Environments
– Ruby Installer
– Devkit
– Rails and Calabash-Android
 Implements
Testing
 Unit Testing
– A software testing method by which individual units of source code
 Integration Testing
– A phase in software testing in which individual software modules are
combined and tested as a group.
 Regression Testing
– A type of software testing that seeks to uncover new software bugs, or
regressions
Manual and Automatic
Manual Automatic
High Effort and Cost requirements Low Effort and Cost requirements
Time consuming
Quick, allows test engineers to focus on
functional areas
Tests are not reusable
Complete reusability based on type of
implementation
Mostly used for integration tests
Can be used for any tests including load,
sanity, system, etc
Risk of human errors Script validates all areas once tested
Automation Testing Tool
Cucumber
 A framework for writing software specifications
 A tool for executing those specifications
– Specifications are written in a readable language that is close to
natural language.
– Scenarios – user behavior driven tests
– Steps – combine mobile operation and logic
Calabash
 A tool
– Predefined and custom steps
– Reuse of tests across platform possible
– For BDD-style acceptance testing
 Run on physical devices or simulators
 Support for webview
 Ruby based
 Cross-platform mobile testing tool
– Cucumber: Android or IOS testing
Implement Steps
Describe behavior in plain text
Write a step definition in Ruby
Run and watch it fail Run and watch it success
Write code to make the step pass
Describe behavior in plain text
 Feature
– Descriptions
 Scenario
– Descriptions
– Preconditions
– Steps
 Given
 When
 And
 But
 Then
Write a step definition in Ruby
Run and watch it fail
 Fail
– Red light and notifications
Write code to make the step pass
Modify
Observer Results and Reports
 Success
– Green light like a cuke
Ruby Installer
 Download RubyInstaller
 Install
– Check the option named “Add Ruby executables to your PATH”
– Test it
 Using “ruby –v” on cmd window
– Observer
 Show “ruby 2.0.0p353 (2013-11-22) [x64-mingw32]”is success.
DevKit
 Download DevKit in a folder which you want to save
– For Instance: D:DevKit
 Navigate the folder on cmd window
– Using “ruby de.rb init”
 Check the file named config.yml is existent
 Using “ruby dk.rb install”on cmd window
Rails and Calabash-Android
 Using “gem update --system” and “gem install rails --no-ri --no-
rdoc”on cmd window
 Install Rails
– Using “gem install rails --no-ri --no-rdoc”
 Test it
– Using “rails –v” on cmd window
 It is successful to show “Rails 4.0.2”
 Using “gem install calabash-android” on cmd window
Prepare Test Cases
 Create a Cucumber skeleton
in your Android project
– Using “calabash-android gen”
on cmd window
 Create a *.feature file
– That is a test case file including
features, function descriptions or
scenarios.
Given, When and Then
 Given
– your preconditions
 When
– describe the key action
 Then
– observe outcomes or an assertion
 And, But
– Using it if you have several givens, whens or thens.
Basic API
 Find out a view - Query(uiquery, *args)
– You can find views and other application objects, and make assertions
about them or extract data from them, and query returns an array of
its results.
 For instance:
Basic API
 Touch - touch(uiquery, options={})
– Touches a view found by performing the query uiquery.
 For instance:
Basic API
 Entering text - enter_text(uiquery, text, options={})
– Taps the first element returned by uiquery, then enters text into the
view.
 For instance:
Basic API
 Tap - tap_when_element_exists(uiquery, options={})
– Waits for an element and taps it when it appears on screen. It raises an
exception if the element doesn't appear within the timeout.
 For instance:
Basic API
 Scroll - scroll_down and scroll_up
– Scrolls the first instance of 'android.widget.ScrollView' either
downwards or upwards.
 For instance:
Run your APP and generate a report
 Using “calabash-android run apkName.apk –format
html –out reports.html” on cmd window

Más contenido relacionado

La actualidad más candente

Automated vs manual testing
Automated vs manual testingAutomated vs manual testing
Automated vs manual testingKanoah
 
Need for automation testing
Need for automation testingNeed for automation testing
Need for automation testing99tests
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testingdidev
 
How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy Impetus Technologies
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework DesignsSauce Labs
 
automation testing benefits
automation testing benefitsautomation testing benefits
automation testing benefitsnazeer pasha
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation TestingArchana Krushnan
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For AgileNaresh Jain
 
Test automation methodologies
Test automation methodologiesTest automation methodologies
Test automation methodologiesMesut Günes
 
Building a Test Automation Strategy for Success
Building a Test Automation Strategy for SuccessBuilding a Test Automation Strategy for Success
Building a Test Automation Strategy for SuccessLee Barnes
 
Test Automation Framework Development Introduction
Test Automation Framework Development IntroductionTest Automation Framework Development Introduction
Test Automation Framework Development IntroductionGanuka Yashantha
 

La actualidad más candente (20)

Automated vs manual testing
Automated vs manual testingAutomated vs manual testing
Automated vs manual testing
 
Test Automation
Test AutomationTest Automation
Test Automation
 
Need for automation testing
Need for automation testingNeed for automation testing
Need for automation testing
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
Selenium Automation Framework
Selenium Automation  FrameworkSelenium Automation  Framework
Selenium Automation Framework
 
How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework Designs
 
automation testing benefits
automation testing benefitsautomation testing benefits
automation testing benefits
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile
 
Test automation methodologies
Test automation methodologiesTest automation methodologies
Test automation methodologies
 
Automation With A Tool Demo
Automation With A Tool DemoAutomation With A Tool Demo
Automation With A Tool Demo
 
BDD with Cucumber
BDD with CucumberBDD with Cucumber
BDD with Cucumber
 
Agile testing
Agile testingAgile testing
Agile testing
 
Introduction to Software Test Automation
Introduction to Software Test AutomationIntroduction to Software Test Automation
Introduction to Software Test Automation
 
Building a Test Automation Strategy for Success
Building a Test Automation Strategy for SuccessBuilding a Test Automation Strategy for Success
Building a Test Automation Strategy for Success
 
QA process Presentation
QA process PresentationQA process Presentation
QA process Presentation
 
Manual testing ppt
Manual testing pptManual testing ppt
Manual testing ppt
 
Test Automation Framework Development Introduction
Test Automation Framework Development IntroductionTest Automation Framework Development Introduction
Test Automation Framework Development Introduction
 

Destacado

Learning's from mobile testing
Learning's from mobile testingLearning's from mobile testing
Learning's from mobile testingVikrant Chauhan
 
Introduction to Gauge
Introduction to GaugeIntroduction to Gauge
Introduction to Gaugevodqancr
 
Create the Future - Innovations in Testing
Create the Future - Innovations in TestingCreate the Future - Innovations in Testing
Create the Future - Innovations in TestingAnand Bagmar
 
Arjuna - Reinventing the Test Automation Wheels
Arjuna - Reinventing the Test Automation WheelsArjuna - Reinventing the Test Automation Wheels
Arjuna - Reinventing the Test Automation WheelsRahul Verma
 
Specifications test automation pyramid public
Specifications test automation pyramid   publicSpecifications test automation pyramid   public
Specifications test automation pyramid publicSathyan Sethumadhavan
 
13 Test Automation Practices You Should be Afraid Of
13 Test Automation Practices You Should be Afraid Of13 Test Automation Practices You Should be Afraid Of
13 Test Automation Practices You Should be Afraid OfJoe Colantonio
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation TestingArchana Krushnan
 
Say NO To (More) Selenium Tests
Say NO To (More) Selenium TestsSay NO To (More) Selenium Tests
Say NO To (More) Selenium TestsAnand Bagmar
 
ICT for Automotive Industry
ICT for Automotive IndustryICT for Automotive Industry
ICT for Automotive IndustryInterlatin
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual TestingDirecti Group
 
Automation Frame works Instruction Sheet
Automation Frame works Instruction SheetAutomation Frame works Instruction Sheet
Automation Frame works Instruction SheetvodQA
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test AutomationPekka Klärck
 
Test Automation - Principles and Practices
Test Automation - Principles and PracticesTest Automation - Principles and Practices
Test Automation - Principles and PracticesAnand Bagmar
 

Destacado (15)

Learning's from mobile testing
Learning's from mobile testingLearning's from mobile testing
Learning's from mobile testing
 
Introduction to Gauge
Introduction to GaugeIntroduction to Gauge
Introduction to Gauge
 
Create the Future - Innovations in Testing
Create the Future - Innovations in TestingCreate the Future - Innovations in Testing
Create the Future - Innovations in Testing
 
Arjuna - Reinventing the Test Automation Wheels
Arjuna - Reinventing the Test Automation WheelsArjuna - Reinventing the Test Automation Wheels
Arjuna - Reinventing the Test Automation Wheels
 
Tw specifications for-testing1
Tw specifications for-testing1Tw specifications for-testing1
Tw specifications for-testing1
 
Specifications test automation pyramid public
Specifications test automation pyramid   publicSpecifications test automation pyramid   public
Specifications test automation pyramid public
 
13 Test Automation Practices You Should be Afraid Of
13 Test Automation Practices You Should be Afraid Of13 Test Automation Practices You Should be Afraid Of
13 Test Automation Practices You Should be Afraid Of
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
 
Say NO To (More) Selenium Tests
Say NO To (More) Selenium TestsSay NO To (More) Selenium Tests
Say NO To (More) Selenium Tests
 
ICT for Automotive Industry
ICT for Automotive IndustryICT for Automotive Industry
ICT for Automotive Industry
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Automation Frame works Instruction Sheet
Automation Frame works Instruction SheetAutomation Frame works Instruction Sheet
Automation Frame works Instruction Sheet
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test Automation
 
Test Automation - Principles and Practices
Test Automation - Principles and PracticesTest Automation - Principles and Practices
Test Automation - Principles and Practices
 
How to be an awesome test automation professional
How to be an awesome test automation professionalHow to be an awesome test automation professional
How to be an awesome test automation professional
 

Similar a Test automation

Calabash-android
Calabash-androidCalabash-android
Calabash-androidAdnan8990
 
End-to-end web-testing in ruby ecosystem
End-to-end web-testing in ruby ecosystemEnd-to-end web-testing in ruby ecosystem
End-to-end web-testing in ruby ecosystemAlex Mikitenko
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
       Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber       Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & CucumberUdaya Kiran
 
Appium workship, Mobile Web+Dev Conference
Appium workship,  Mobile Web+Dev ConferenceAppium workship,  Mobile Web+Dev Conference
Appium workship, Mobile Web+Dev ConferenceIsaac Murchie
 
Appium mobile web+dev conference
Appium   mobile web+dev conferenceAppium   mobile web+dev conference
Appium mobile web+dev conferenceIsaac Murchie
 
Load Testing: See a Bigger Picture
Load Testing: See a Bigger PictureLoad Testing: See a Bigger Picture
Load Testing: See a Bigger PictureAlexander Podelko
 
Tutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopTutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopVivek Krishnakumar
 
Javascript tdd byandreapaciolla
Javascript tdd byandreapaciollaJavascript tdd byandreapaciolla
Javascript tdd byandreapaciollaAndrea Paciolla
 
Testing in Craft CMS
Testing in Craft CMSTesting in Craft CMS
Testing in Craft CMSJustinHolt20
 
Anatomy of a Build Pipeline
Anatomy of a Build PipelineAnatomy of a Build Pipeline
Anatomy of a Build PipelineSamuel Brown
 
Uber Mobility Meetup: Mobile Testing
Uber Mobility Meetup:  Mobile TestingUber Mobility Meetup:  Mobile Testing
Uber Mobility Meetup: Mobile TestingApple Chow
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with AppiumLuke Maung
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appiumPratik Patel
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
 
Continuous Integration using Cruise Control
Continuous Integration using Cruise ControlContinuous Integration using Cruise Control
Continuous Integration using Cruise Controlelliando dias
 

Similar a Test automation (20)

Calabash-android
Calabash-androidCalabash-android
Calabash-android
 
End-to-end web-testing in ruby ecosystem
End-to-end web-testing in ruby ecosystemEnd-to-end web-testing in ruby ecosystem
End-to-end web-testing in ruby ecosystem
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
       Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber       Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
 
Appium workship, Mobile Web+Dev Conference
Appium workship,  Mobile Web+Dev ConferenceAppium workship,  Mobile Web+Dev Conference
Appium workship, Mobile Web+Dev Conference
 
Why Automate
Why AutomateWhy Automate
Why Automate
 
Appium mobile web+dev conference
Appium   mobile web+dev conferenceAppium   mobile web+dev conference
Appium mobile web+dev conference
 
cucumber harpal.pdf
cucumber harpal.pdfcucumber harpal.pdf
cucumber harpal.pdf
 
Load Testing: See a Bigger Picture
Load Testing: See a Bigger PictureLoad Testing: See a Bigger Picture
Load Testing: See a Bigger Picture
 
Qtp basic
Qtp basicQtp basic
Qtp basic
 
Appium
AppiumAppium
Appium
 
Tutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopTutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer Workshop
 
Javascript tdd byandreapaciolla
Javascript tdd byandreapaciollaJavascript tdd byandreapaciolla
Javascript tdd byandreapaciolla
 
Testing in Craft CMS
Testing in Craft CMSTesting in Craft CMS
Testing in Craft CMS
 
Anatomy of a Build Pipeline
Anatomy of a Build PipelineAnatomy of a Build Pipeline
Anatomy of a Build Pipeline
 
Uber Mobility Meetup: Mobile Testing
Uber Mobility Meetup:  Mobile TestingUber Mobility Meetup:  Mobile Testing
Uber Mobility Meetup: Mobile Testing
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Continuous Integration using Cruise Control
Continuous Integration using Cruise ControlContinuous Integration using Cruise Control
Continuous Integration using Cruise Control
 

Más de Xavier Yin

UI/UX - 別讓我思考
UI/UX - 別讓我思考UI/UX - 別讓我思考
UI/UX - 別讓我思考Xavier Yin
 
機器學習與資料探勘:決策樹
機器學習與資料探勘:決策樹機器學習與資料探勘:決策樹
機器學習與資料探勘:決策樹Xavier Yin
 
Tku-網路資料的串接與資料儲存
Tku-網路資料的串接與資料儲存Tku-網路資料的串接與資料儲存
Tku-網路資料的串接與資料儲存Xavier Yin
 
Tku-行動app開發管理實務-Android應用程式開發基礎
Tku-行動app開發管理實務-Android應用程式開發基礎Tku-行動app開發管理實務-Android應用程式開發基礎
Tku-行動app開發管理實務-Android應用程式開發基礎Xavier Yin
 
Tku-行動app開發管理實務-如何開發Android應用程式
Tku-行動app開發管理實務-如何開發Android應用程式Tku-行動app開發管理實務-如何開發Android應用程式
Tku-行動app開發管理實務-如何開發Android應用程式Xavier Yin
 
TKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom AdapterTKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom AdapterXavier Yin
 
行動App開發管理實務unit4
行動App開發管理實務unit4行動App開發管理實務unit4
行動App開發管理實務unit4Xavier Yin
 
行動App開發管理實務unit3
行動App開發管理實務unit3行動App開發管理實務unit3
行動App開發管理實務unit3Xavier Yin
 
Material design - widgets and sample code
Material design - widgets and sample codeMaterial design - widgets and sample code
Material design - widgets and sample codeXavier Yin
 
行動App開發管理實務 unit2
行動App開發管理實務 unit2行動App開發管理實務 unit2
行動App開發管理實務 unit2Xavier Yin
 
Material design introduction
Material design introductionMaterial design introduction
Material design introductionXavier Yin
 
行動App開發管理實務 unit1
行動App開發管理實務 unit1行動App開發管理實務 unit1
行動App開發管理實務 unit1Xavier Yin
 

Más de Xavier Yin (12)

UI/UX - 別讓我思考
UI/UX - 別讓我思考UI/UX - 別讓我思考
UI/UX - 別讓我思考
 
機器學習與資料探勘:決策樹
機器學習與資料探勘:決策樹機器學習與資料探勘:決策樹
機器學習與資料探勘:決策樹
 
Tku-網路資料的串接與資料儲存
Tku-網路資料的串接與資料儲存Tku-網路資料的串接與資料儲存
Tku-網路資料的串接與資料儲存
 
Tku-行動app開發管理實務-Android應用程式開發基礎
Tku-行動app開發管理實務-Android應用程式開發基礎Tku-行動app開發管理實務-Android應用程式開發基礎
Tku-行動app開發管理實務-Android應用程式開發基礎
 
Tku-行動app開發管理實務-如何開發Android應用程式
Tku-行動app開發管理實務-如何開發Android應用程式Tku-行動app開發管理實務-如何開發Android應用程式
Tku-行動app開發管理實務-如何開發Android應用程式
 
TKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom AdapterTKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom Adapter
 
行動App開發管理實務unit4
行動App開發管理實務unit4行動App開發管理實務unit4
行動App開發管理實務unit4
 
行動App開發管理實務unit3
行動App開發管理實務unit3行動App開發管理實務unit3
行動App開發管理實務unit3
 
Material design - widgets and sample code
Material design - widgets and sample codeMaterial design - widgets and sample code
Material design - widgets and sample code
 
行動App開發管理實務 unit2
行動App開發管理實務 unit2行動App開發管理實務 unit2
行動App開發管理實務 unit2
 
Material design introduction
Material design introductionMaterial design introduction
Material design introduction
 
行動App開發管理實務 unit1
行動App開發管理實務 unit1行動App開發管理實務 unit1
行動App開發管理實務 unit1
 

Último

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
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
 
"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
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
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
 
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
 

Último (20)

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
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
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
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
 
"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
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
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
 
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?
 

Test automation

  • 1. Test Automation Using Cucumber and Calabash Xavier Yin 201/01/15
  • 2. Outline  Introduction – Testing – Comparisons – Automation Testing Tool – Implement Steps  Environments – Ruby Installer – Devkit – Rails and Calabash-Android  Implements
  • 3. Testing  Unit Testing – A software testing method by which individual units of source code  Integration Testing – A phase in software testing in which individual software modules are combined and tested as a group.  Regression Testing – A type of software testing that seeks to uncover new software bugs, or regressions
  • 4. Manual and Automatic Manual Automatic High Effort and Cost requirements Low Effort and Cost requirements Time consuming Quick, allows test engineers to focus on functional areas Tests are not reusable Complete reusability based on type of implementation Mostly used for integration tests Can be used for any tests including load, sanity, system, etc Risk of human errors Script validates all areas once tested
  • 6. Cucumber  A framework for writing software specifications  A tool for executing those specifications – Specifications are written in a readable language that is close to natural language. – Scenarios – user behavior driven tests – Steps – combine mobile operation and logic
  • 7. Calabash  A tool – Predefined and custom steps – Reuse of tests across platform possible – For BDD-style acceptance testing  Run on physical devices or simulators  Support for webview  Ruby based  Cross-platform mobile testing tool – Cucumber: Android or IOS testing
  • 8. Implement Steps Describe behavior in plain text Write a step definition in Ruby Run and watch it fail Run and watch it success Write code to make the step pass
  • 9. Describe behavior in plain text  Feature – Descriptions  Scenario – Descriptions – Preconditions – Steps  Given  When  And  But  Then
  • 10. Write a step definition in Ruby
  • 11. Run and watch it fail  Fail – Red light and notifications
  • 12. Write code to make the step pass Modify
  • 13. Observer Results and Reports  Success – Green light like a cuke
  • 14. Ruby Installer  Download RubyInstaller  Install – Check the option named “Add Ruby executables to your PATH” – Test it  Using “ruby –v” on cmd window – Observer  Show “ruby 2.0.0p353 (2013-11-22) [x64-mingw32]”is success.
  • 15. DevKit  Download DevKit in a folder which you want to save – For Instance: D:DevKit  Navigate the folder on cmd window – Using “ruby de.rb init”  Check the file named config.yml is existent  Using “ruby dk.rb install”on cmd window
  • 16. Rails and Calabash-Android  Using “gem update --system” and “gem install rails --no-ri --no- rdoc”on cmd window  Install Rails – Using “gem install rails --no-ri --no-rdoc”  Test it – Using “rails –v” on cmd window  It is successful to show “Rails 4.0.2”  Using “gem install calabash-android” on cmd window
  • 17. Prepare Test Cases  Create a Cucumber skeleton in your Android project – Using “calabash-android gen” on cmd window  Create a *.feature file – That is a test case file including features, function descriptions or scenarios.
  • 18. Given, When and Then  Given – your preconditions  When – describe the key action  Then – observe outcomes or an assertion  And, But – Using it if you have several givens, whens or thens.
  • 19. Basic API  Find out a view - Query(uiquery, *args) – You can find views and other application objects, and make assertions about them or extract data from them, and query returns an array of its results.  For instance:
  • 20. Basic API  Touch - touch(uiquery, options={}) – Touches a view found by performing the query uiquery.  For instance:
  • 21. Basic API  Entering text - enter_text(uiquery, text, options={}) – Taps the first element returned by uiquery, then enters text into the view.  For instance:
  • 22. Basic API  Tap - tap_when_element_exists(uiquery, options={}) – Waits for an element and taps it when it appears on screen. It raises an exception if the element doesn't appear within the timeout.  For instance:
  • 23. Basic API  Scroll - scroll_down and scroll_up – Scrolls the first instance of 'android.widget.ScrollView' either downwards or upwards.  For instance:
  • 24. Run your APP and generate a report  Using “calabash-android run apkName.apk –format html –out reports.html” on cmd window