SlideShare a Scribd company logo
CALABASH -
JENKINS - GIT
AUTOMATED TESTING
ALL YOU
NEED IS
HOW TO TEST ON LOCAL DEVICE?
https://github.com/calabash/calabash-android
CUCUMBER IS
FOR BEHAVIOUR-
DRIVEN
DEVELOPMENT
Someone on Cucumber Website
CUCUMBER
CUCUMBER SCRIPT
▸ Here’s the example for cucumber script
for create scenario testing in human
level (i mean it :) )
▸ If anyone had experience with ruby this
script already used by ruby on rails
testing method with rspec framework
▸ This cucumber will call and parsed on
real ruby files helper with regex method
CUCUMBER
▸ Rules cucumber script
▸ For advance use please check
CUCUMBER SCRIPT
Ex. Touch something
Then I touch “login” button
Then = Represent do this line after doing something for action in first time you can use “Given” with initial
condition ex. (Given I am on “login” page) while check if “login” page really present on screen
touch = Represent the action of this part of scenario it can be “fill”, “swipe”, “wait”, “scroll”, “rotate”, etc.
login = Represent the target for the action you can get this id from query all element in screen
button = Represent the element to test by the action
* Make sure create make sense action for test the scenario because you can use this for random purpose
https://github.com/calabash/calabash-ios/wiki/02-Predefined-steps
CUCUMBER
ACCESSING THE ID OF VIEW PRESENT
Wildan-Garviandi:~/tmp/android$ calabash-android console login.apk
irb(main):001:0> reinstall_apps
=> nil
irb(main):002:0> start_test_server_in_background
=> nil
To get the id of view of present view you can do it via terminal
The result from query all views is :
irb(main):001:0> query("button")
[{"id"=>"login_button",
"enabled"=>true,
"contentDescription"=>nil,
"text"=>"Login",
"qualified_class"=>"android.widget.Button",
"frame"=>{"y"=>322, "height"=>73, "width"=>84, "x"=>135},
"description"=>"android.widget.Button@40584908",
"class"=>"Button"},
{"id"=>"login_button_slow",
"enabled"=>true,
"contentDescription"=>nil,
"text"=>"Login (slow)",
"qualified_class"=>"android.widget.Button",
"frame"=>{"y"=>322, "height"=>73, "width"=>143, "x"=>234},
"description"=>"android.widget.Button@40585390",
"class"=>"Button"}]
RUBY
DEFINE THE CUCUMBER SCENARIO
▸ calabash_steps.rb
You’ll find more than 2 ruby file first one is :
This is class for parsing cucumber .feature files into ruby action
ex.require 'calabash-android/calabash_steps'
# Given I am on the Login Page
Given(/^I am on the Login Page$/) do
page(LoginPage).on_login_page
end
# Then I touch "countrycode text"
Then(/^I touch ("countrycode text")$/) do
page(LoginPage).touch_country_code
end
RUBY
DEFINE THE CUCUMBER SCENARIO
▸ <feature_name>page.rb
The second one is :
This is class is action for all test process with Calabash ruby API more detail on :
ex.
require 'calabash-android/abase'
class LoginPage < Calabash::ABase
def trait
"* text:'Login Page'"
end
@@editTextSearchCountryCode = "* id:'search_et'"
def touch_search_text
touch(@@editTextSearchCountryCode)
end
def insert_phone_number
enter_text(@@phoneNumber, @@phoneNumberToTest)
end
https://github.com/calabash/calabash-ios/wiki/Calabash-iOS-Ruby-API
TEXT
DEFINE THE CUCUMBER SCENARIO
require 'calabash-android/abase'
class LoginPage < Calabash::ABase
def trait
"* text:'Login Page'"
end
@@editTextSearchCountryCode = "* id:’search_et'"
@@phoneNumber = "* marked:'Input your Mobile Number’"
@@phoneNumberToTest = 81615468105
def touch_search_text
touch(@@editTextSearchCountryCode)
end
def insert_phone_number
enter_text(@@phoneNumber, @@phoneNumberToTest)
end
<— this where the id from query used for
}
JENKINS PROCFILE
JENKINS PROCFILE PROCEDURE
▸ run_android_feature
This config file contain all step to running the feature test on jenkins
PARAMS="-p android"
while getopts ":rd:" OPTION; do
case $OPTION in
r)
PARAMS=$PARAMS" --format json -o cucumber.json"
;;
d)
PARAMS=$PARAMS" ADB_DEVICE_ARG=$OPTARG"
;;
[?]) echo "Usage: $0 [-r] [-d DEVICE_ID].n -r: should create reports.n DEVICE_ID: where to run tests.
exit 1;;
esac
done
# clear old files
rm -rf test_servers
# resign apk
bundle exec calabash-android build "/build/outputs/apk/app-debug.apk"
# run tests
bundle exec calabash-android run "/build/outputs/apk/app-debug.apk"
SO ALL YOU NEED
ONLY …▸ <feature_name>.feature on /features
▸ calabash_steps.rb on /features/step_definitions
▸ <feature_name>Page.rb on
/features/support/<feature_name>
▸ And most importent file for running all test at Jenkins is
run_android_feature
GIT
HOW TO RUN YOUR TEST ON JENKINS?
▸ All you need is just merge your feature branch to branch calabash-
test and wait for the test is pass or failure
▸ For more detail if failure or success you can log in to jenkins page
and see the report
JENKINS
CUCUMBER TEST
RESULT
ths is example of report on jenkins for testing scenario
THAT’S IT
AND

More Related Content

What's hot

Using Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in RubyUsing Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in Ruby
LaunchAny
 
Advanced JavaScript build pipelines using Gulp.js
Advanced JavaScript build pipelines using Gulp.jsAdvanced JavaScript build pipelines using Gulp.js
Advanced JavaScript build pipelines using Gulp.js
Stefan Baumgartner
 
Plumbin Pipelines - A Gulp.js workshop
Plumbin Pipelines - A Gulp.js workshopPlumbin Pipelines - A Gulp.js workshop
Plumbin Pipelines - A Gulp.js workshop
Stefan Baumgartner
 
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About ItBoxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Puppet
 
CoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copyCoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copy
Patrick Devins
 
Haibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy againHaibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy again
Frank Rousseau
 
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on RailsUsing ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Dave Bouwman
 
Extracting ruby gem
Extracting ruby gemExtracting ruby gem
Extracting ruby gem
Yura Tolstik
 
CoffeeScript in 5mins
CoffeeScript in 5minsCoffeeScript in 5mins
CoffeeScript in 5mins
Masakuni Kato
 
The Power of F#
The Power of F#The Power of F#
The Power of F#
Isaac Abraham
 
Sinatra for REST services
Sinatra for REST servicesSinatra for REST services
Sinatra for REST services
Emanuele DelBono
 
Drupal + selenium
Drupal + seleniumDrupal + selenium
Drupal + selenium
hernanibf
 
Vagrant 의 활용
Vagrant 의 활용Vagrant 의 활용
Vagrant 의 활용
InHwan Chun
 
HTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & socketsHTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & sockets
Remy Sharp
 
A Blink Into The Rails Magic
A Blink Into The Rails MagicA Blink Into The Rails Magic
A Blink Into The Rails Magic
Nikos Dimitrakopoulos
 
Coffeescript: An Opinionated Introduction
Coffeescript: An Opinionated IntroductionCoffeescript: An Opinionated Introduction
Coffeescript: An Opinionated Introduction
Joe Fleming
 
Adventurous Merb
Adventurous MerbAdventurous Merb
Adventurous Merb
Matt Todd
 
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and P...
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and P...Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and P...
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and P...
Rob Friesel
 
Rails3勘所
Rails3勘所Rails3勘所
Rails3勘所
Hiroshi Nakao
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Ryan Weaver
 

What's hot (20)

Using Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in RubyUsing Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in Ruby
 
Advanced JavaScript build pipelines using Gulp.js
Advanced JavaScript build pipelines using Gulp.jsAdvanced JavaScript build pipelines using Gulp.js
Advanced JavaScript build pipelines using Gulp.js
 
Plumbin Pipelines - A Gulp.js workshop
Plumbin Pipelines - A Gulp.js workshopPlumbin Pipelines - A Gulp.js workshop
Plumbin Pipelines - A Gulp.js workshop
 
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About ItBoxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About It
 
CoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copyCoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copy
 
Haibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy againHaibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy again
 
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on RailsUsing ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
 
Extracting ruby gem
Extracting ruby gemExtracting ruby gem
Extracting ruby gem
 
CoffeeScript in 5mins
CoffeeScript in 5minsCoffeeScript in 5mins
CoffeeScript in 5mins
 
The Power of F#
The Power of F#The Power of F#
The Power of F#
 
Sinatra for REST services
Sinatra for REST servicesSinatra for REST services
Sinatra for REST services
 
Drupal + selenium
Drupal + seleniumDrupal + selenium
Drupal + selenium
 
Vagrant 의 활용
Vagrant 의 활용Vagrant 의 활용
Vagrant 의 활용
 
HTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & socketsHTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & sockets
 
A Blink Into The Rails Magic
A Blink Into The Rails MagicA Blink Into The Rails Magic
A Blink Into The Rails Magic
 
Coffeescript: An Opinionated Introduction
Coffeescript: An Opinionated IntroductionCoffeescript: An Opinionated Introduction
Coffeescript: An Opinionated Introduction
 
Adventurous Merb
Adventurous MerbAdventurous Merb
Adventurous Merb
 
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and P...
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and P...Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and P...
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and P...
 
Rails3勘所
Rails3勘所Rails3勘所
Rails3勘所
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
 

Viewers also liked

Parafluidik™Overview
Parafluidik™OverviewParafluidik™Overview
Parafluidik™Overview
Jacob Caldwell
 
Ian Lurie - “Weird, Useful, Significant: Internet Marketing for Grown-Ups”
Ian Lurie - “Weird, Useful, Significant: Internet Marketing for Grown-Ups”Ian Lurie - “Weird, Useful, Significant: Internet Marketing for Grown-Ups”
Ian Lurie - “Weird, Useful, Significant: Internet Marketing for Grown-Ups”
Confluence Conference
 
Nhung cau-hoi-thuong-gap-khi-ca-chet tham-khao-tu-uc
Nhung cau-hoi-thuong-gap-khi-ca-chet tham-khao-tu-ucNhung cau-hoi-thuong-gap-khi-ca-chet tham-khao-tu-uc
Nhung cau-hoi-thuong-gap-khi-ca-chet tham-khao-tu-uc
Thaothuc Sg
 
E-commerce
E-commerceE-commerce
E-commerce
Ishu Verma
 
Challenges in Surveying the Deep Sea using Acoustic Remote Sensing and Remote...
Challenges in Surveying the Deep Sea using Acoustic Remote Sensing and Remote...Challenges in Surveying the Deep Sea using Acoustic Remote Sensing and Remote...
Challenges in Surveying the Deep Sea using Acoustic Remote Sensing and Remote...
COGS Presentations
 
كيمياء
كيمياء كيمياء
كيمياء
rorooo00
 
La belle in the public
La belle in the publicLa belle in the public
La belle in the public
cookwp
 
Generate Winning PLA Results
Generate Winning PLA ResultsGenerate Winning PLA Results
Generate Winning PLA Results
Matthew Umbro
 
Prepare a Preliminary Audit Plan based on a Case Study
Prepare a Preliminary Audit Plan based on a Case StudyPrepare a Preliminary Audit Plan based on a Case Study
Prepare a Preliminary Audit Plan based on a Case Study
David Thompson
 
Productized 2016
Productized 2016Productized 2016
Productized 2016
Raitis Linde
 
Project presentation - Martin
Project presentation - MartinProject presentation - Martin
Project presentation - Martin
Martin Siagian
 
Link Building with Open Site Explorer
Link Building with Open Site ExplorerLink Building with Open Site Explorer
Link Building with Open Site Explorer
Rand Fishkin
 
Mga ekspresyon
Mga ekspresyonMga ekspresyon
Mga ekspresyon
Ladylhyn Emuhzihzah
 
VWO - Trinity Webinar - 10 Ways to Convert More Orders
VWO - Trinity Webinar - 10 Ways to Convert More OrdersVWO - Trinity Webinar - 10 Ways to Convert More Orders
VWO - Trinity Webinar - 10 Ways to Convert More Orders
VWO
 
Pushknot
PushknotPushknot
Pushknot
Ankita Gupta
 
Ocean dolphins and whales powerpoint
Ocean dolphins and whales powerpointOcean dolphins and whales powerpoint
Ocean dolphins and whales powerpoint
doridwyer
 
Buchbranche 2020
Buchbranche 2020Buchbranche 2020
Buchbranche 2020
awa1
 

Viewers also liked (17)

Parafluidik™Overview
Parafluidik™OverviewParafluidik™Overview
Parafluidik™Overview
 
Ian Lurie - “Weird, Useful, Significant: Internet Marketing for Grown-Ups”
Ian Lurie - “Weird, Useful, Significant: Internet Marketing for Grown-Ups”Ian Lurie - “Weird, Useful, Significant: Internet Marketing for Grown-Ups”
Ian Lurie - “Weird, Useful, Significant: Internet Marketing for Grown-Ups”
 
Nhung cau-hoi-thuong-gap-khi-ca-chet tham-khao-tu-uc
Nhung cau-hoi-thuong-gap-khi-ca-chet tham-khao-tu-ucNhung cau-hoi-thuong-gap-khi-ca-chet tham-khao-tu-uc
Nhung cau-hoi-thuong-gap-khi-ca-chet tham-khao-tu-uc
 
E-commerce
E-commerceE-commerce
E-commerce
 
Challenges in Surveying the Deep Sea using Acoustic Remote Sensing and Remote...
Challenges in Surveying the Deep Sea using Acoustic Remote Sensing and Remote...Challenges in Surveying the Deep Sea using Acoustic Remote Sensing and Remote...
Challenges in Surveying the Deep Sea using Acoustic Remote Sensing and Remote...
 
كيمياء
كيمياء كيمياء
كيمياء
 
La belle in the public
La belle in the publicLa belle in the public
La belle in the public
 
Generate Winning PLA Results
Generate Winning PLA ResultsGenerate Winning PLA Results
Generate Winning PLA Results
 
Prepare a Preliminary Audit Plan based on a Case Study
Prepare a Preliminary Audit Plan based on a Case StudyPrepare a Preliminary Audit Plan based on a Case Study
Prepare a Preliminary Audit Plan based on a Case Study
 
Productized 2016
Productized 2016Productized 2016
Productized 2016
 
Project presentation - Martin
Project presentation - MartinProject presentation - Martin
Project presentation - Martin
 
Link Building with Open Site Explorer
Link Building with Open Site ExplorerLink Building with Open Site Explorer
Link Building with Open Site Explorer
 
Mga ekspresyon
Mga ekspresyonMga ekspresyon
Mga ekspresyon
 
VWO - Trinity Webinar - 10 Ways to Convert More Orders
VWO - Trinity Webinar - 10 Ways to Convert More OrdersVWO - Trinity Webinar - 10 Ways to Convert More Orders
VWO - Trinity Webinar - 10 Ways to Convert More Orders
 
Pushknot
PushknotPushknot
Pushknot
 
Ocean dolphins and whales powerpoint
Ocean dolphins and whales powerpointOcean dolphins and whales powerpoint
Ocean dolphins and whales powerpoint
 
Buchbranche 2020
Buchbranche 2020Buchbranche 2020
Buchbranche 2020
 

Similar to Calabash automated test

Android testing calabash
Android testing calabashAndroid testing calabash
Android testing calabash
kellinreaver
 
Behavior driven development with calabash for android
Behavior driven development with calabash for androidBehavior driven development with calabash for android
Behavior driven development with calabash for android
Teresa Holfeld
 
Ninad cucumber rails
Ninad cucumber railsNinad cucumber rails
Ninad cucumber rails
ninad23p
 
Reliable Javascript
Reliable Javascript Reliable Javascript
Reliable Javascript
Glenn Stovall
 
DrupalCon jQuery
DrupalCon jQueryDrupalCon jQuery
DrupalCon jQuery
Nathan Smith
 
Ruby gems
Ruby gemsRuby gems
Ruby gems
Papp Laszlo
 
Pourquoi ruby et rails déchirent
Pourquoi ruby et rails déchirentPourquoi ruby et rails déchirent
Pourquoi ruby et rails déchirent
Nicolas Ledez
 
Sprockets
SprocketsSprockets
Calabash-android
Calabash-androidCalabash-android
Calabash-android
Adnan8990
 
JAVASCRIPT NÃO-OBSTRUTIVO com jQuery
JAVASCRIPT NÃO-OBSTRUTIVO com jQueryJAVASCRIPT NÃO-OBSTRUTIVO com jQuery
JAVASCRIPT NÃO-OBSTRUTIVO com jQuery
Zigotto Tecnologia
 
Writing Software not Code with Cucumber
Writing Software not Code with CucumberWriting Software not Code with Cucumber
Writing Software not Code with Cucumber
Ben Mabey
 
A tour on ruby and friends
A tour on ruby and friendsA tour on ruby and friends
A tour on ruby and friends
旻琦 潘
 
Introduce cucumber
Introduce cucumberIntroduce cucumber
Introduce cucumber
Bachue Zhou
 
Rails2 Pr
Rails2 PrRails2 Pr
Rails2 Pr
xibbar
 
State management in a GraphQL era
State management in a GraphQL eraState management in a GraphQL era
State management in a GraphQL era
kristijanmkd
 
Integrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby AmfIntegrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby Amf
railsconf
 
Flex With Rubyamf
Flex With RubyamfFlex With Rubyamf
Flex With Rubyamf
Tony Hillerson
 
Building maintainable javascript applications
Building maintainable javascript applicationsBuilding maintainable javascript applications
Building maintainable javascript applications
equisodie
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budget
David Lukac
 
How to eat Cucmber
How to eat CucmberHow to eat Cucmber
How to eat Cucmber
Naoki Nishiguchi
 

Similar to Calabash automated test (20)

Android testing calabash
Android testing calabashAndroid testing calabash
Android testing calabash
 
Behavior driven development with calabash for android
Behavior driven development with calabash for androidBehavior driven development with calabash for android
Behavior driven development with calabash for android
 
Ninad cucumber rails
Ninad cucumber railsNinad cucumber rails
Ninad cucumber rails
 
Reliable Javascript
Reliable Javascript Reliable Javascript
Reliable Javascript
 
DrupalCon jQuery
DrupalCon jQueryDrupalCon jQuery
DrupalCon jQuery
 
Ruby gems
Ruby gemsRuby gems
Ruby gems
 
Pourquoi ruby et rails déchirent
Pourquoi ruby et rails déchirentPourquoi ruby et rails déchirent
Pourquoi ruby et rails déchirent
 
Sprockets
SprocketsSprockets
Sprockets
 
Calabash-android
Calabash-androidCalabash-android
Calabash-android
 
JAVASCRIPT NÃO-OBSTRUTIVO com jQuery
JAVASCRIPT NÃO-OBSTRUTIVO com jQueryJAVASCRIPT NÃO-OBSTRUTIVO com jQuery
JAVASCRIPT NÃO-OBSTRUTIVO com jQuery
 
Writing Software not Code with Cucumber
Writing Software not Code with CucumberWriting Software not Code with Cucumber
Writing Software not Code with Cucumber
 
A tour on ruby and friends
A tour on ruby and friendsA tour on ruby and friends
A tour on ruby and friends
 
Introduce cucumber
Introduce cucumberIntroduce cucumber
Introduce cucumber
 
Rails2 Pr
Rails2 PrRails2 Pr
Rails2 Pr
 
State management in a GraphQL era
State management in a GraphQL eraState management in a GraphQL era
State management in a GraphQL era
 
Integrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby AmfIntegrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby Amf
 
Flex With Rubyamf
Flex With RubyamfFlex With Rubyamf
Flex With Rubyamf
 
Building maintainable javascript applications
Building maintainable javascript applicationsBuilding maintainable javascript applications
Building maintainable javascript applications
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budget
 
How to eat Cucmber
How to eat CucmberHow to eat Cucmber
How to eat Cucmber
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 

Calabash automated test

  • 1. CALABASH - JENKINS - GIT AUTOMATED TESTING
  • 2. ALL YOU NEED IS HOW TO TEST ON LOCAL DEVICE? https://github.com/calabash/calabash-android
  • 4. CUCUMBER CUCUMBER SCRIPT ▸ Here’s the example for cucumber script for create scenario testing in human level (i mean it :) ) ▸ If anyone had experience with ruby this script already used by ruby on rails testing method with rspec framework ▸ This cucumber will call and parsed on real ruby files helper with regex method
  • 5. CUCUMBER ▸ Rules cucumber script ▸ For advance use please check CUCUMBER SCRIPT Ex. Touch something Then I touch “login” button Then = Represent do this line after doing something for action in first time you can use “Given” with initial condition ex. (Given I am on “login” page) while check if “login” page really present on screen touch = Represent the action of this part of scenario it can be “fill”, “swipe”, “wait”, “scroll”, “rotate”, etc. login = Represent the target for the action you can get this id from query all element in screen button = Represent the element to test by the action * Make sure create make sense action for test the scenario because you can use this for random purpose https://github.com/calabash/calabash-ios/wiki/02-Predefined-steps
  • 6. CUCUMBER ACCESSING THE ID OF VIEW PRESENT Wildan-Garviandi:~/tmp/android$ calabash-android console login.apk irb(main):001:0> reinstall_apps => nil irb(main):002:0> start_test_server_in_background => nil To get the id of view of present view you can do it via terminal The result from query all views is : irb(main):001:0> query("button") [{"id"=>"login_button", "enabled"=>true, "contentDescription"=>nil, "text"=>"Login", "qualified_class"=>"android.widget.Button", "frame"=>{"y"=>322, "height"=>73, "width"=>84, "x"=>135}, "description"=>"android.widget.Button@40584908", "class"=>"Button"}, {"id"=>"login_button_slow", "enabled"=>true, "contentDescription"=>nil, "text"=>"Login (slow)", "qualified_class"=>"android.widget.Button", "frame"=>{"y"=>322, "height"=>73, "width"=>143, "x"=>234}, "description"=>"android.widget.Button@40585390", "class"=>"Button"}]
  • 7. RUBY DEFINE THE CUCUMBER SCENARIO ▸ calabash_steps.rb You’ll find more than 2 ruby file first one is : This is class for parsing cucumber .feature files into ruby action ex.require 'calabash-android/calabash_steps' # Given I am on the Login Page Given(/^I am on the Login Page$/) do page(LoginPage).on_login_page end # Then I touch "countrycode text" Then(/^I touch ("countrycode text")$/) do page(LoginPage).touch_country_code end
  • 8. RUBY DEFINE THE CUCUMBER SCENARIO ▸ <feature_name>page.rb The second one is : This is class is action for all test process with Calabash ruby API more detail on : ex. require 'calabash-android/abase' class LoginPage < Calabash::ABase def trait "* text:'Login Page'" end @@editTextSearchCountryCode = "* id:'search_et'" def touch_search_text touch(@@editTextSearchCountryCode) end def insert_phone_number enter_text(@@phoneNumber, @@phoneNumberToTest) end https://github.com/calabash/calabash-ios/wiki/Calabash-iOS-Ruby-API
  • 9. TEXT DEFINE THE CUCUMBER SCENARIO require 'calabash-android/abase' class LoginPage < Calabash::ABase def trait "* text:'Login Page'" end @@editTextSearchCountryCode = "* id:’search_et'" @@phoneNumber = "* marked:'Input your Mobile Number’" @@phoneNumberToTest = 81615468105 def touch_search_text touch(@@editTextSearchCountryCode) end def insert_phone_number enter_text(@@phoneNumber, @@phoneNumberToTest) end <— this where the id from query used for }
  • 10. JENKINS PROCFILE JENKINS PROCFILE PROCEDURE ▸ run_android_feature This config file contain all step to running the feature test on jenkins PARAMS="-p android" while getopts ":rd:" OPTION; do case $OPTION in r) PARAMS=$PARAMS" --format json -o cucumber.json" ;; d) PARAMS=$PARAMS" ADB_DEVICE_ARG=$OPTARG" ;; [?]) echo "Usage: $0 [-r] [-d DEVICE_ID].n -r: should create reports.n DEVICE_ID: where to run tests. exit 1;; esac done # clear old files rm -rf test_servers # resign apk bundle exec calabash-android build "/build/outputs/apk/app-debug.apk" # run tests bundle exec calabash-android run "/build/outputs/apk/app-debug.apk"
  • 11. SO ALL YOU NEED ONLY …▸ <feature_name>.feature on /features ▸ calabash_steps.rb on /features/step_definitions ▸ <feature_name>Page.rb on /features/support/<feature_name> ▸ And most importent file for running all test at Jenkins is run_android_feature
  • 12. GIT HOW TO RUN YOUR TEST ON JENKINS? ▸ All you need is just merge your feature branch to branch calabash- test and wait for the test is pass or failure ▸ For more detail if failure or success you can log in to jenkins page and see the report
  • 13. JENKINS CUCUMBER TEST RESULT ths is example of report on jenkins for testing scenario