SlideShare a Scribd company logo
1 of 56
Download to read offline
Mobiltest automation 
- experiences from the trenches 
Let’s Talk Apple, 11. sep, 2014 
Niels Frydenholm, ebay Classifieds
eBay Inc. Confidential 
2 
Agenda 
• Intro 
• Tools 
• Examples 
/ 
Demo 
• Continuous 
Integration 
/ 
Follow 
up 
• Challenges 
• Latest 
improvements 
• Questions?
eBay 
Classifieds, 
Denmark 
• DBA, 
BilBasen 
og 
Bilinfo 
• DBA 
(a 
classifieds 
site/app) 
has 
approx. 
1 
mill 
downloads 
• BilBasen 
(cars) 
has 
approx. 
450.000 
downloads 
• Both 
brands 
have 
apps 
for 
iPhone, 
iPad 
and 
Android 
• Traffic 
from 
mobile 
doubled 
during 
2013 
• Strive 
for 
rapid 
releases 
eBay Inc. Confidential 3
How 
we 
are 
organised 
eBay Inc. Confidential 4 
• Developers 
• QA 
• Product Owner 
• UX 
• Other stakeholders
Tools 
eBay Inc. Confidential 5 
Jenkins (CI)
Cucumber 
-­‐ 
more 
than 
a 
test 
tool 
eBay Inc. Confidential 6
Cucumber 
-­‐ 
more 
than 
a 
test 
tool 
eBay Inc. Confidential 6
Cucumber 
-­‐ 
more 
than 
a 
test 
tool 
• Behaviour-­‐Driven 
Development 
• Adds 
“power” 
to 
Gherkin 
syntax 
• A 
great 
way 
to 
communicate 
and 
cooperate 
between 
“the 
business 
people”, 
developers 
and 
QA. 
• Written 
in 
(your) 
business/domain 
language 
• Easy 
to 
both 
read 
and 
write 
eBay Inc. Confidential 6
Cucumber 
-­‐ 
more 
than 
a 
test 
tool 
• Behaviour-­‐Driven 
Development 
• Adds 
“power” 
to 
Gherkin 
syntax 
• A 
great 
way 
to 
communicate 
and 
cooperate 
between 
“the 
business 
people”, 
developers 
and 
QA. 
• Written 
in 
(your) 
business/domain 
language 
• Easy 
to 
both 
read 
and 
write 
eBay Inc. Confidential 6 
Feature: Simple search 
As a user 
I want to be able to do simple searches
Cucumber 
-­‐ 
more 
than 
a 
test 
tool 
• Behaviour-­‐Driven 
Development 
• Adds 
“power” 
to 
Gherkin 
syntax 
• A 
great 
way 
to 
communicate 
and 
cooperate 
between 
“the 
business 
people”, 
developers 
and 
QA. 
• Written 
in 
(your) 
business/domain 
language 
• Easy 
to 
both 
read 
and 
write 
eBay Inc. Confidential 6 
Feature: Simple search 
As a user 
I want to be able to do simple searches 
Scenario: I can search without any parameters 
Given I am on search 
When I perform the search 
Then I see the result
Cucumber 
-­‐ 
more 
than 
a 
test 
tool 
• Behaviour-­‐Driven 
Development 
• Adds 
“power” 
to 
Gherkin 
syntax 
• A 
great 
way 
to 
communicate 
and 
cooperate 
between 
“the 
business 
people”, 
developers 
and 
QA. 
• Written 
in 
(your) 
business/domain 
language 
• Easy 
to 
both 
read 
and 
write 
eBay Inc. Confidential 6 
Feature: Simple search 
As a user 
I want to be able to do simple searches 
Scenario: I can search without any parameters 
Given I am on search 
When I perform the search 
Then I see the result 
Step-definition! ! 
Then(/^I see the result$/) do! 
unless query("view marked:'SearchResultCell'").count > 0! 
screenshot_and_raise "No result was shown"! 
end! 
end! !
Calabash 
• Enables 
the 
use 
of 
Cucumber 
for 
Native 
apps 
• iOS 
• Android 
! 
• The 
bits 
and 
pieces 
that 
interact 
with 
the 
app 
• touch, 
scroll, 
swipe 
etc 
• Query-­‐syntax 
(iOS 
examples) 
• query(“label 
marked:’label 
text’”) 
• query(“button 
marked:’Ok’”) 
eBay Inc. Confidential 7
Calabash 
-­‐ 
architecture 
eBay Inc. Confidential 8
Scenario 
implementation 
example 
eBay Inc. Confidential 9
Scenario: Check that change classification clears 
matrixdata with warning! 
Given I am logged in as "Buyer"! 
And I am on the SYI hub! 
And I select classification "Hovedtelefoner"! 
And I set "Type" to “Nakkekontur”! 
And I set price to "250"! ! 
When I press "Kategori"! 
Then I wait for "Du er ved at skifte kategori" to appear! ! 
When I touch "Fortryd"! 
Then I see cells containing "Nakkekontur"! ! 
When I press "Kategori"! 
Then I wait for "Du er ved at skifte kategori" to appear! ! 
When I touch "Skift"! 
Then I see the SYI classification search! 
eBay Inc. Confidential 
9 
Scenario 
implementation 
example 
SYI = Sell your item
Scenario: Check that change classification clears 
matrixdata with warning! 
Given I am logged in as "Buyer"! 
And I am on the SYI hub! 
And I select classification "Hovedtelefoner"! 
And I set "Type" to “Nakkekontur”! 
And I set price to "250"! ! 
When I press "Kategori"! 
Then I wait for "Du er ved at skifte kategori" to appear! ! 
When I touch "Fortryd"! 
Then I see cells containing "Nakkekontur"! ! 
When I press "Kategori"! 
Then I wait for "Du er ved at skifte kategori" to appear! ! 
When I touch "Skift"! 
Then I see the SYI classification search! 
eBay Inc. Confidential 
9 
Scenario: Check that change classification clears 
matrixdata with warning 
Given I am logged in as "Buyer" 
And I am on the SYI hub 
And I select classification "Hovedtelefoner" 
And I set matrixdata "Type" to “Nakkekontur" 
And I set price to "250"! ! 
When I try to change classification 
Then I see an alert with title "Du er ved at skifte kategori" ! 
When I cancel the alert 
Then the classification is "Nakkekontur" ! 
When I try to change classification 
Then I see an alert with title "Du er ved at skifte kategori" ! 
When I accept the change classification alert 
Then I see the SYI classification search 
Scenario 
implementation 
example
Scenario 
implementation 
example 
Step from “sell your item feature”! ! 
And I set price to "250" 
eBay Inc. Confidential 10
Scenario 
implementation 
example 
! 
And /^I set price to "(.*?)"$/ do |price|! 
macro 'I swipe up'! 
sleep(1)! 
touch("view marked:'Price'")! 
sleep(0.5)! 
set_text("view marked:'Price'", price)! 
sleep(0.5)! 
touch("view marked:'OK'")! 
sleep(1)! 
end 
Step from “sell your item feature”! ! 
And I set price to "250" 
eBay Inc. Confidential 10
Scenario 
implementation 
example 
! 
And /^I set price to "(.*?)"$/ do |price|! 
macro 'I swipe up'! 
sleep(1)! 
touch("view marked:'Price'")! 
sleep(0.5)! 
set_text("view marked:'Price'", price)! 
sleep(0.5)! 
touch("view marked:'OK'")! 
sleep(1)! 
end 
Step from “sell your item feature”! ! 
And I set price to "250" 
eBay Inc. Confidential 10 
! 
And /^I set price to "(.*?)"$/ do |price| 
@page.write_price(price) 
end
Scenario 
implementation 
example 
! 
And /^I set price to "(.*?)"$/ do |price|! 
macro 'I swipe up'! 
sleep(1)! 
touch("view marked:'Price'")! 
sleep(0.5)! 
set_text("view marked:'Price'", price)! 
sleep(0.5)! 
touch("view marked:'OK'")! 
sleep(1)! 
end 
Step from “sell your item feature”! ! 
And I set price to "250" 
eBay Inc. Confidential 10 
! 
And /^I set price to "(.*?)"$/ do |price| 
@page.write_price(price) 
end 
SellYourItemPage (page object) 
def write_price(price) 
scroll_and_wait_for_row_with_mark("priceCell") 
touch("view marked:'Price'") 
keyboard_enter_text price 
close_keyboard 
end
PageObject 
pattern 
Feature 
Scenario 
Step 
eBay Inc. Confidential 11
PageObject 
pattern 
Feature 
Scenario 
Step 
Page object 
iPad iPhone Android 
eBay Inc. Confidential 11
PageObject 
pattern 
Feature 
Scenario 
Step 
Page object 
iPad iPhone Android 
eBay Inc. Confidential 11
PageObject 
pattern 
Feature 
Scenario 
Step 
Page object 
iPad iPhone Android 
eBay Inc. Confidential 11 
SyiHubPage (PageObject) ! 
• go_to_picture_center ! 
• go_to_classification_search !• 
go_to_value_selection_for_matrix 
data(label) ! 
• write_price(price)
PageObject 
pattern 
Feature 
Scenario 
Step 
Page object 
iPad iPhone Android 
eBay Inc. Confidential 11 
SyiHubPage (PageObject) ! 
• go_to_picture_center ! 
• go_to_classification_search !• 
go_to_value_selection_for_matrix 
data(label) ! 
• write_price(price)
DEMO 
eBay Inc. Confidential 12
Continuous 
Integration 
• Jenkins 
on 
a 
couple 
of 
Mac 
Mini’s 
• Runs 
multiple 
builds/tests 
in 
parallel 
(Master/Slave 
Jenkins 
setup) 
• The 
tests 
only 
runs 
in 
the 
simulator 
• Unit 
tests 
—> 
Integration 
tests 
—> 
Accept/UI 
tests 
• A 
subset 
of 
the 
Accept 
tests 
run 
after 
each 
commit 
• Controlled 
by 
@tags 
in 
cucumber 
• All 
Accept 
tests 
runs 
once 
every 
evening 
(or 
manually) 
eBay Inc. Confidential 13
The 
“control 
room” 
eBay Inc. Confidential 14
The 
“control 
room” 
eBay Inc. Confidential 14
Cucumber 
reports 
eBay Inc. Confidential 15
Cucumber 
reports 
eBay Inc. Confidential 15
When 
it 
fails… 
eBay Inc. Confidential 16
Ensure 
high 
quality 
tests 
• Review 
and/or 
Pair 
program 
tests 
with 
QA 
• (Only) 
use 
“Custom 
steps” 
• Test 
code 
is 
(also) 
production 
code 
• Let 
the 
quality 
reflect 
that! 
• Refactor, 
Refactor, 
Refactor! 
• Make 
sure 
the 
tests 
actually 
covers 
what 
is 
expected 
• Do 
it 
with 
facts 
-­‐ 
no 
guessing/assumptions 
eBay Inc. Confidential 17
Code 
coverage 
• Do 
not 
(necessarily) 
focus 
on 
the 
coverage 
percentage 
• Find 
inspiration 
to 
new 
test 
scenarios 
• Ensure 
every 
feature 
in 
the 
app 
is 
well 
covered 
eBay Inc. Confidential 18
Code 
coverage 
• Do 
not 
(necessarily) 
focus 
on 
the 
coverage 
percentage 
• Find 
inspiration 
to 
new 
test 
scenarios 
• Ensure 
every 
feature 
in 
the 
app 
is 
well 
covered 
eBay Inc. Confidential 18
Code 
coverage 
• Do 
not 
(necessarily) 
focus 
on 
the 
coverage 
percentage 
• Find 
inspiration 
to 
new 
test 
scenarios 
• Ensure 
every 
feature 
in 
the 
app 
is 
well 
covered 
eBay Inc. Confidential 18
Code 
coverage 
• Do 
not 
(necessarily) 
focus 
on 
the 
coverage 
percentage 
• Find 
inspiration 
to 
new 
test 
scenarios 
• Ensure 
every 
feature 
in 
the 
app 
is 
well 
covered 
eBay Inc. Confidential 18
Keys 
to 
success 
• Team 
effort 
• Definition 
of 
Done 
(DoD) 
includes 
automated 
tests 
• Know 
that 
it 
costs 
time 
-­‐ 
it’s 
not 
a 
silver 
bullet 
• Maintenance 
of 
setup 
-­‐ 
new 
versions 
of 
iOS 
& 
Calabash 
• Fix 
broken 
builds 
ASAP! 
eBay Inc. Confidential 19
Future 
improvements 
(as 
seen 
in 
January) 
Run 
a 
subset 
of 
tests 
in 
Xamarin 
test 
cloud 
a 
couple 
of 
times 
each 
week 
Do 
more 
BDD/TDD 
Automatic 
feature 
builds 
on 
Jenkins 
Faster 
feedback 
cycle 
Select 
a 
subset 
(with 
@tags) 
to 
run 
after 
each 
commit 
Use 
“backdoor” 
to 
do 
e.g. 
login 
Avoid 
resetting 
after 
each 
scenario 
Make 
all 
tests 
run 
stable 
all 
the 
time! 
eBay Inc. Confidential 20
Xamarin 
Cloud 
eBay Inc. Confidential 21
Xamarin 
Cloud 
• Currently 
only 
as 
proof 
of 
concept 
on 
eBay Inc. Confidential 21 
DBA 
• 
5 
scenarios 
on 
3 
devices 
• Waiting 
for 
a 
proxy 
solution 
to 
take 
full 
advantage 
• Create 
listings 
(and 
complete 
payments) 
• BilBasen 
is 
also 
running 
in 
the 
cloud 
• Trying 
out 
“Series” 
for 
iPad 
and 
iPhone 
and 
other 
cloud 
experiments 
to 
find 
out 
what 
works 
best 
for 
us
Calabash 
backdoor 
eBay Inc. Confidential 22
Calabash 
backdoor 
• Invoke 
logic 
in 
the 
app 
“behind 
the 
scenes” 
• Reduce 
scenario 
test-­‐time 
• Avoid 
testing 
the 
same 
UI 
over 
and 
over 
eBay Inc. Confidential 22 
in 
each 
scenario 
• Stable 
• Easy 
to 
use
Calabash 
backdoor 
• Invoke 
logic 
in 
the 
app 
“behind 
the 
scenes” 
• Reduce 
scenario 
test-­‐time 
• Avoid 
testing 
the 
same 
UI 
over 
and 
over 
eBay Inc. Confidential 22 
in 
each 
scenario 
• Stable 
• Easy 
to 
use 
• We 
use 
it 
for 
• Login 
(and 
create 
user) 
• Create 
listings 
• Clean 
up 
data 
• (Code 
coverage)
Unstable 
tests 
eBay Inc. Confidential 23
Unstable 
tests 
• UI 
Automation 
/ 
iOS 
Simulator 
often 
eBay Inc. Confidential 23 
fails 
• I 
thought 
it 
was 
Calabash 
being 
unstable 
:-­‐) 
• We 
would 
start 
tests 
over 
and 
over 
and 
over… 
• …and 
overlook 
real 
failures 
• It 
was 
almost 
impossible 
to 
get 
our 
“All 
scenarios” 
to 
run 
green
Stable 
tests 
• Cucumber 
Rerun 
formatter 
to 
the 
rescue 
eBay Inc. Confidential 24
Stable 
tests 
• Cucumber 
Rerun 
formatter 
to 
the 
rescue 
A simple script that will…. 
eBay Inc. Confidential 24
Stable 
tests 
• Cucumber 
Rerun 
formatter 
to 
the 
rescue 
A simple script that will…. 
Run tests - use rerun formatter 
eBay Inc. Confidential 24
Stable 
tests 
• Cucumber 
Rerun 
formatter 
to 
the 
rescue 
A simple script that will…. 
Run tests - use rerun formatter 
If rerun.txt contains tests - run them 
eBay Inc. Confidential 24
Stable 
tests 
• Cucumber 
Rerun 
formatter 
to 
the 
rescue 
A simple script that will…. 
Run tests - use rerun formatter 
If rerun.txt contains tests - run them 
Inform jenkins how it all went 
eBay Inc. Confidential 24
Stable 
tests 
• Cucumber 
Rerun 
formatter 
to 
the 
rescue 
A simple script that will…. 
Run tests - use rerun formatter 
If rerun.txt contains tests - run them 
Inform jenkins how it all went 
Replace rerun result in original result 
eBay Inc. Confidential 24
Stable 
tests 
• Cucumber 
Rerun 
formatter 
to 
the 
rescue 
A simple script that will…. 
Run tests - use rerun formatter 
If rerun.txt contains tests - run them 
Inform jenkins how it all went 
Replace rerun result in original result 
eBay Inc. Confidential 24
Wrap 
up! 
• Test 
scenarios 
follows 
the 
code 
= 
the 
truth 
• Enables 
rapid 
releases 
/ 
fast 
time 
to 
market 
• A 
necessity 
to 
deliver 
high 
quality 
• Spend 
less 
time 
doing 
(boring) 
trivial 
regression 
tests 
• Happy 
QA´er 
• Brave 
developers 
-­‐ 
higher 
code 
quality 
• Quality 
product 
• Happy 
users 
eBay Inc. Confidential 25
QUESTIONS? 
eBay Inc. Confidential 26
Ressourcer 
• The 
Cucumber 
Book 
• Calabash 
@github 
(https://github.com/calabash/) 
• Calabash 
google 
groups 
• https://groups.google.com/forum/#!forum/calabash-­‐ios 
• https://groups.google.com/forum/#!forum/calabash-­‐android 
• Calabash 
overview 
(http://docs.xamarin.com/guides/cross-­‐platform/test_cloud/calabash/intro_to_calabash/) 
• Jenkins 
(http://jenkins-­‐ci.org/) 
• plugins: 
Cucumber-­‐reports, 
Cobertura 
(code 
coverage), 
Build 
monitor 
view 
• RubyMine 
(http://www.jetbrains.com/ruby/) 
• Uncle 
Bobs 
Clean 
Code 
• because 
it’s 
a 
great 
book 
that 
promotes 
craftsmanship 
eBay Inc. Confidential 27

More Related Content

What's hot

Automated Acceptance Tests in .NET
Automated Acceptance Tests in .NETAutomated Acceptance Tests in .NET
Automated Acceptance Tests in .NETWyn B. Van Devanter
 
Bdd with Cucumber and Mocha
Bdd with Cucumber and MochaBdd with Cucumber and Mocha
Bdd with Cucumber and MochaAtish Narlawar
 
Effectively Using UI Automation
Effectively Using UI AutomationEffectively Using UI Automation
Effectively Using UI AutomationAlexander Repty
 
Appcelerator Titanium Alloy
Appcelerator Titanium AlloyAppcelerator Titanium Alloy
Appcelerator Titanium AlloyKarthi Ponnusamy
 
I, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot OverlordsI, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot OverlordsSteve Malsam
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application TestingYnon Perek
 
Design First API's with RAML and SoapUI
Design First API's with RAML and SoapUIDesign First API's with RAML and SoapUI
Design First API's with RAML and SoapUIDaniel Feist
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, SuccessfullySauce Labs
 
Implementing Testing for Behavior-Driven Development Using Cucumber
Implementing Testing for Behavior-Driven Development Using CucumberImplementing Testing for Behavior-Driven Development Using Cucumber
Implementing Testing for Behavior-Driven Development Using CucumberTechWell
 
Building strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsBuilding strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsandyinthecloud
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with CucumberBrandon Keepers
 
Effectively Testing Services - Burlington Ruby Conf
Effectively Testing Services - Burlington Ruby ConfEffectively Testing Services - Burlington Ruby Conf
Effectively Testing Services - Burlington Ruby Confneal_kemp
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choicetoddbr
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object PatternDante Briones
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Brian Sam-Bodden
 
ScreenPlay Design Patterns for QA Automation
ScreenPlay Design Patterns for QA AutomationScreenPlay Design Patterns for QA Automation
ScreenPlay Design Patterns for QA AutomationCOMAQA.BY
 
Nightwatch at Tilt
Nightwatch at TiltNightwatch at Tilt
Nightwatch at TiltDave King
 
Test Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and MochaTest Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and MochaSalesforce Developers
 

What's hot (20)

Automated Acceptance Tests in .NET
Automated Acceptance Tests in .NETAutomated Acceptance Tests in .NET
Automated Acceptance Tests in .NET
 
Bdd with Cucumber and Mocha
Bdd with Cucumber and MochaBdd with Cucumber and Mocha
Bdd with Cucumber and Mocha
 
Effectively Using UI Automation
Effectively Using UI AutomationEffectively Using UI Automation
Effectively Using UI Automation
 
Appcelerator Titanium Alloy
Appcelerator Titanium AlloyAppcelerator Titanium Alloy
Appcelerator Titanium Alloy
 
I, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot OverlordsI, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot Overlords
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application Testing
 
Testable requirements
Testable requirementsTestable requirements
Testable requirements
 
Design First API's with RAML and SoapUI
Design First API's with RAML and SoapUIDesign First API's with RAML and SoapUI
Design First API's with RAML and SoapUI
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, Successfully
 
Implementing Testing for Behavior-Driven Development Using Cucumber
Implementing Testing for Behavior-Driven Development Using CucumberImplementing Testing for Behavior-Driven Development Using Cucumber
Implementing Testing for Behavior-Driven Development Using Cucumber
 
Building strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsBuilding strong foundations apex enterprise patterns
Building strong foundations apex enterprise patterns
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 
Effectively Testing Services - Burlington Ruby Conf
Effectively Testing Services - Burlington Ruby ConfEffectively Testing Services - Burlington Ruby Conf
Effectively Testing Services - Burlington Ruby Conf
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object Pattern
 
React a11y-csun
React a11y-csunReact a11y-csun
React a11y-csun
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
 
ScreenPlay Design Patterns for QA Automation
ScreenPlay Design Patterns for QA AutomationScreenPlay Design Patterns for QA Automation
ScreenPlay Design Patterns for QA Automation
 
Nightwatch at Tilt
Nightwatch at TiltNightwatch at Tilt
Nightwatch at Tilt
 
Test Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and MochaTest Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and Mocha
 

Similar to Automated UI test on mobile - with Cucumber/Calabash

Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Niels Frydenholm
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructureLindsay Holmwood
 
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014Jean-Loup Yu
 
Mobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B ExperimentsMobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B Experimentslacyrhoades
 
Cross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowCross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowChristian Hassa
 
Functional testing the_good_the_bad_and_the_ugly
Functional testing the_good_the_bad_and_the_uglyFunctional testing the_good_the_bad_and_the_ugly
Functional testing the_good_the_bad_and_the_uglyJohn Ferguson Smart Limited
 
Test driven development with behat and silex
Test driven development with behat and silexTest driven development with behat and silex
Test driven development with behat and silexDionyshs Tsoumas
 
Growth Hacking Guide - Mindset, Framework and Tools
Growth Hacking Guide - Mindset, Framework and ToolsGrowth Hacking Guide - Mindset, Framework and Tools
Growth Hacking Guide - Mindset, Framework and ToolsDavid Arnoux . Growth
 
Getting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Getting Started with Test Automation: Introduction to Cucumber with Lapis LazuliGetting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Getting Started with Test Automation: Introduction to Cucumber with Lapis LazuliRebecca Eloise Hogg
 
SEO Blog Growth: My Top To Bottom Process - ContentJam 2018
SEO Blog Growth: My Top To Bottom Process - ContentJam 2018SEO Blog Growth: My Top To Bottom Process - ContentJam 2018
SEO Blog Growth: My Top To Bottom Process - ContentJam 2018Evolving SEO
 
DevTeach12-betterspecs
DevTeach12-betterspecsDevTeach12-betterspecs
DevTeach12-betterspecsAmir Barylko
 
Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Eric Overfield
 
Solving Problems with YUI3: AutoComplete
Solving Problems with YUI3: AutoCompleteSolving Problems with YUI3: AutoComplete
Solving Problems with YUI3: AutoCompleteIsaacSchlueter
 
Premature optimisation: The Root of All Evil
Premature optimisation: The Root of All EvilPremature optimisation: The Root of All Evil
Premature optimisation: The Root of All EvilFabio Akita
 
DevCommerce Conference 2016: Performance, anti-patterns e stacks pra desenvol...
DevCommerce Conference 2016: Performance, anti-patterns e stacks pra desenvol...DevCommerce Conference 2016: Performance, anti-patterns e stacks pra desenvol...
DevCommerce Conference 2016: Performance, anti-patterns e stacks pra desenvol...iMasters
 
Customer Development Power-Ups
Customer Development Power-UpsCustomer Development Power-Ups
Customer Development Power-UpsLean Startup Co.
 
jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScriptjQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScriptPhilipp Bosch
 

Similar to Automated UI test on mobile - with Cucumber/Calabash (20)

Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructure
 
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
 
Mobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B ExperimentsMobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B Experiments
 
Cross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowCross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlow
 
Functional testing the_good_the_bad_and_the_ugly
Functional testing the_good_the_bad_and_the_uglyFunctional testing the_good_the_bad_and_the_ugly
Functional testing the_good_the_bad_and_the_ugly
 
Test driven development with behat and silex
Test driven development with behat and silexTest driven development with behat and silex
Test driven development with behat and silex
 
behat
behatbehat
behat
 
Growth Hacking Guide - Mindset, Framework and Tools
Growth Hacking Guide - Mindset, Framework and ToolsGrowth Hacking Guide - Mindset, Framework and Tools
Growth Hacking Guide - Mindset, Framework and Tools
 
Getting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Getting Started with Test Automation: Introduction to Cucumber with Lapis LazuliGetting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Getting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
 
Big Websites
Big WebsitesBig Websites
Big Websites
 
SEO Blog Growth: My Top To Bottom Process - ContentJam 2018
SEO Blog Growth: My Top To Bottom Process - ContentJam 2018SEO Blog Growth: My Top To Bottom Process - ContentJam 2018
SEO Blog Growth: My Top To Bottom Process - ContentJam 2018
 
DevTeach12-betterspecs
DevTeach12-betterspecsDevTeach12-betterspecs
DevTeach12-betterspecs
 
Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365
 
Solving Problems with YUI3: AutoComplete
Solving Problems with YUI3: AutoCompleteSolving Problems with YUI3: AutoComplete
Solving Problems with YUI3: AutoComplete
 
Swift meetup22june2015
Swift meetup22june2015Swift meetup22june2015
Swift meetup22june2015
 
Premature optimisation: The Root of All Evil
Premature optimisation: The Root of All EvilPremature optimisation: The Root of All Evil
Premature optimisation: The Root of All Evil
 
DevCommerce Conference 2016: Performance, anti-patterns e stacks pra desenvol...
DevCommerce Conference 2016: Performance, anti-patterns e stacks pra desenvol...DevCommerce Conference 2016: Performance, anti-patterns e stacks pra desenvol...
DevCommerce Conference 2016: Performance, anti-patterns e stacks pra desenvol...
 
Customer Development Power-Ups
Customer Development Power-UpsCustomer Development Power-Ups
Customer Development Power-Ups
 
jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScriptjQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
 

Recently uploaded

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
 
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
 
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
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
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
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
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
 
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
 
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
 
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
 
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
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 

Recently uploaded (20)

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
 
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
 
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
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.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
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
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
 
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
 
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
 
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
 
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
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
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.
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 

Automated UI test on mobile - with Cucumber/Calabash

  • 1. Mobiltest automation - experiences from the trenches Let’s Talk Apple, 11. sep, 2014 Niels Frydenholm, ebay Classifieds
  • 2. eBay Inc. Confidential 2 Agenda • Intro • Tools • Examples / Demo • Continuous Integration / Follow up • Challenges • Latest improvements • Questions?
  • 3. eBay Classifieds, Denmark • DBA, BilBasen og Bilinfo • DBA (a classifieds site/app) has approx. 1 mill downloads • BilBasen (cars) has approx. 450.000 downloads • Both brands have apps for iPhone, iPad and Android • Traffic from mobile doubled during 2013 • Strive for rapid releases eBay Inc. Confidential 3
  • 4. How we are organised eBay Inc. Confidential 4 • Developers • QA • Product Owner • UX • Other stakeholders
  • 5. Tools eBay Inc. Confidential 5 Jenkins (CI)
  • 6. Cucumber -­‐ more than a test tool eBay Inc. Confidential 6
  • 7. Cucumber -­‐ more than a test tool eBay Inc. Confidential 6
  • 8. Cucumber -­‐ more than a test tool • Behaviour-­‐Driven Development • Adds “power” to Gherkin syntax • A great way to communicate and cooperate between “the business people”, developers and QA. • Written in (your) business/domain language • Easy to both read and write eBay Inc. Confidential 6
  • 9. Cucumber -­‐ more than a test tool • Behaviour-­‐Driven Development • Adds “power” to Gherkin syntax • A great way to communicate and cooperate between “the business people”, developers and QA. • Written in (your) business/domain language • Easy to both read and write eBay Inc. Confidential 6 Feature: Simple search As a user I want to be able to do simple searches
  • 10. Cucumber -­‐ more than a test tool • Behaviour-­‐Driven Development • Adds “power” to Gherkin syntax • A great way to communicate and cooperate between “the business people”, developers and QA. • Written in (your) business/domain language • Easy to both read and write eBay Inc. Confidential 6 Feature: Simple search As a user I want to be able to do simple searches Scenario: I can search without any parameters Given I am on search When I perform the search Then I see the result
  • 11. Cucumber -­‐ more than a test tool • Behaviour-­‐Driven Development • Adds “power” to Gherkin syntax • A great way to communicate and cooperate between “the business people”, developers and QA. • Written in (your) business/domain language • Easy to both read and write eBay Inc. Confidential 6 Feature: Simple search As a user I want to be able to do simple searches Scenario: I can search without any parameters Given I am on search When I perform the search Then I see the result Step-definition! ! Then(/^I see the result$/) do! unless query("view marked:'SearchResultCell'").count > 0! screenshot_and_raise "No result was shown"! end! end! !
  • 12. Calabash • Enables the use of Cucumber for Native apps • iOS • Android ! • The bits and pieces that interact with the app • touch, scroll, swipe etc • Query-­‐syntax (iOS examples) • query(“label marked:’label text’”) • query(“button marked:’Ok’”) eBay Inc. Confidential 7
  • 13. Calabash -­‐ architecture eBay Inc. Confidential 8
  • 14. Scenario implementation example eBay Inc. Confidential 9
  • 15. Scenario: Check that change classification clears matrixdata with warning! Given I am logged in as "Buyer"! And I am on the SYI hub! And I select classification "Hovedtelefoner"! And I set "Type" to “Nakkekontur”! And I set price to "250"! ! When I press "Kategori"! Then I wait for "Du er ved at skifte kategori" to appear! ! When I touch "Fortryd"! Then I see cells containing "Nakkekontur"! ! When I press "Kategori"! Then I wait for "Du er ved at skifte kategori" to appear! ! When I touch "Skift"! Then I see the SYI classification search! eBay Inc. Confidential 9 Scenario implementation example SYI = Sell your item
  • 16. Scenario: Check that change classification clears matrixdata with warning! Given I am logged in as "Buyer"! And I am on the SYI hub! And I select classification "Hovedtelefoner"! And I set "Type" to “Nakkekontur”! And I set price to "250"! ! When I press "Kategori"! Then I wait for "Du er ved at skifte kategori" to appear! ! When I touch "Fortryd"! Then I see cells containing "Nakkekontur"! ! When I press "Kategori"! Then I wait for "Du er ved at skifte kategori" to appear! ! When I touch "Skift"! Then I see the SYI classification search! eBay Inc. Confidential 9 Scenario: Check that change classification clears matrixdata with warning Given I am logged in as "Buyer" And I am on the SYI hub And I select classification "Hovedtelefoner" And I set matrixdata "Type" to “Nakkekontur" And I set price to "250"! ! When I try to change classification Then I see an alert with title "Du er ved at skifte kategori" ! When I cancel the alert Then the classification is "Nakkekontur" ! When I try to change classification Then I see an alert with title "Du er ved at skifte kategori" ! When I accept the change classification alert Then I see the SYI classification search Scenario implementation example
  • 17. Scenario implementation example Step from “sell your item feature”! ! And I set price to "250" eBay Inc. Confidential 10
  • 18. Scenario implementation example ! And /^I set price to "(.*?)"$/ do |price|! macro 'I swipe up'! sleep(1)! touch("view marked:'Price'")! sleep(0.5)! set_text("view marked:'Price'", price)! sleep(0.5)! touch("view marked:'OK'")! sleep(1)! end Step from “sell your item feature”! ! And I set price to "250" eBay Inc. Confidential 10
  • 19. Scenario implementation example ! And /^I set price to "(.*?)"$/ do |price|! macro 'I swipe up'! sleep(1)! touch("view marked:'Price'")! sleep(0.5)! set_text("view marked:'Price'", price)! sleep(0.5)! touch("view marked:'OK'")! sleep(1)! end Step from “sell your item feature”! ! And I set price to "250" eBay Inc. Confidential 10 ! And /^I set price to "(.*?)"$/ do |price| @page.write_price(price) end
  • 20. Scenario implementation example ! And /^I set price to "(.*?)"$/ do |price|! macro 'I swipe up'! sleep(1)! touch("view marked:'Price'")! sleep(0.5)! set_text("view marked:'Price'", price)! sleep(0.5)! touch("view marked:'OK'")! sleep(1)! end Step from “sell your item feature”! ! And I set price to "250" eBay Inc. Confidential 10 ! And /^I set price to "(.*?)"$/ do |price| @page.write_price(price) end SellYourItemPage (page object) def write_price(price) scroll_and_wait_for_row_with_mark("priceCell") touch("view marked:'Price'") keyboard_enter_text price close_keyboard end
  • 21. PageObject pattern Feature Scenario Step eBay Inc. Confidential 11
  • 22. PageObject pattern Feature Scenario Step Page object iPad iPhone Android eBay Inc. Confidential 11
  • 23. PageObject pattern Feature Scenario Step Page object iPad iPhone Android eBay Inc. Confidential 11
  • 24. PageObject pattern Feature Scenario Step Page object iPad iPhone Android eBay Inc. Confidential 11 SyiHubPage (PageObject) ! • go_to_picture_center ! • go_to_classification_search !• go_to_value_selection_for_matrix data(label) ! • write_price(price)
  • 25. PageObject pattern Feature Scenario Step Page object iPad iPhone Android eBay Inc. Confidential 11 SyiHubPage (PageObject) ! • go_to_picture_center ! • go_to_classification_search !• go_to_value_selection_for_matrix data(label) ! • write_price(price)
  • 26. DEMO eBay Inc. Confidential 12
  • 27. Continuous Integration • Jenkins on a couple of Mac Mini’s • Runs multiple builds/tests in parallel (Master/Slave Jenkins setup) • The tests only runs in the simulator • Unit tests —> Integration tests —> Accept/UI tests • A subset of the Accept tests run after each commit • Controlled by @tags in cucumber • All Accept tests runs once every evening (or manually) eBay Inc. Confidential 13
  • 28. The “control room” eBay Inc. Confidential 14
  • 29. The “control room” eBay Inc. Confidential 14
  • 30. Cucumber reports eBay Inc. Confidential 15
  • 31. Cucumber reports eBay Inc. Confidential 15
  • 32. When it fails… eBay Inc. Confidential 16
  • 33. Ensure high quality tests • Review and/or Pair program tests with QA • (Only) use “Custom steps” • Test code is (also) production code • Let the quality reflect that! • Refactor, Refactor, Refactor! • Make sure the tests actually covers what is expected • Do it with facts -­‐ no guessing/assumptions eBay Inc. Confidential 17
  • 34. Code coverage • Do not (necessarily) focus on the coverage percentage • Find inspiration to new test scenarios • Ensure every feature in the app is well covered eBay Inc. Confidential 18
  • 35. Code coverage • Do not (necessarily) focus on the coverage percentage • Find inspiration to new test scenarios • Ensure every feature in the app is well covered eBay Inc. Confidential 18
  • 36. Code coverage • Do not (necessarily) focus on the coverage percentage • Find inspiration to new test scenarios • Ensure every feature in the app is well covered eBay Inc. Confidential 18
  • 37. Code coverage • Do not (necessarily) focus on the coverage percentage • Find inspiration to new test scenarios • Ensure every feature in the app is well covered eBay Inc. Confidential 18
  • 38. Keys to success • Team effort • Definition of Done (DoD) includes automated tests • Know that it costs time -­‐ it’s not a silver bullet • Maintenance of setup -­‐ new versions of iOS & Calabash • Fix broken builds ASAP! eBay Inc. Confidential 19
  • 39. Future improvements (as seen in January) Run a subset of tests in Xamarin test cloud a couple of times each week Do more BDD/TDD Automatic feature builds on Jenkins Faster feedback cycle Select a subset (with @tags) to run after each commit Use “backdoor” to do e.g. login Avoid resetting after each scenario Make all tests run stable all the time! eBay Inc. Confidential 20
  • 40. Xamarin Cloud eBay Inc. Confidential 21
  • 41. Xamarin Cloud • Currently only as proof of concept on eBay Inc. Confidential 21 DBA • 5 scenarios on 3 devices • Waiting for a proxy solution to take full advantage • Create listings (and complete payments) • BilBasen is also running in the cloud • Trying out “Series” for iPad and iPhone and other cloud experiments to find out what works best for us
  • 42. Calabash backdoor eBay Inc. Confidential 22
  • 43. Calabash backdoor • Invoke logic in the app “behind the scenes” • Reduce scenario test-­‐time • Avoid testing the same UI over and over eBay Inc. Confidential 22 in each scenario • Stable • Easy to use
  • 44. Calabash backdoor • Invoke logic in the app “behind the scenes” • Reduce scenario test-­‐time • Avoid testing the same UI over and over eBay Inc. Confidential 22 in each scenario • Stable • Easy to use • We use it for • Login (and create user) • Create listings • Clean up data • (Code coverage)
  • 45. Unstable tests eBay Inc. Confidential 23
  • 46. Unstable tests • UI Automation / iOS Simulator often eBay Inc. Confidential 23 fails • I thought it was Calabash being unstable :-­‐) • We would start tests over and over and over… • …and overlook real failures • It was almost impossible to get our “All scenarios” to run green
  • 47. Stable tests • Cucumber Rerun formatter to the rescue eBay Inc. Confidential 24
  • 48. Stable tests • Cucumber Rerun formatter to the rescue A simple script that will…. eBay Inc. Confidential 24
  • 49. Stable tests • Cucumber Rerun formatter to the rescue A simple script that will…. Run tests - use rerun formatter eBay Inc. Confidential 24
  • 50. Stable tests • Cucumber Rerun formatter to the rescue A simple script that will…. Run tests - use rerun formatter If rerun.txt contains tests - run them eBay Inc. Confidential 24
  • 51. Stable tests • Cucumber Rerun formatter to the rescue A simple script that will…. Run tests - use rerun formatter If rerun.txt contains tests - run them Inform jenkins how it all went eBay Inc. Confidential 24
  • 52. Stable tests • Cucumber Rerun formatter to the rescue A simple script that will…. Run tests - use rerun formatter If rerun.txt contains tests - run them Inform jenkins how it all went Replace rerun result in original result eBay Inc. Confidential 24
  • 53. Stable tests • Cucumber Rerun formatter to the rescue A simple script that will…. Run tests - use rerun formatter If rerun.txt contains tests - run them Inform jenkins how it all went Replace rerun result in original result eBay Inc. Confidential 24
  • 54. Wrap up! • Test scenarios follows the code = the truth • Enables rapid releases / fast time to market • A necessity to deliver high quality • Spend less time doing (boring) trivial regression tests • Happy QA´er • Brave developers -­‐ higher code quality • Quality product • Happy users eBay Inc. Confidential 25
  • 55. QUESTIONS? eBay Inc. Confidential 26
  • 56. Ressourcer • The Cucumber Book • Calabash @github (https://github.com/calabash/) • Calabash google groups • https://groups.google.com/forum/#!forum/calabash-­‐ios • https://groups.google.com/forum/#!forum/calabash-­‐android • Calabash overview (http://docs.xamarin.com/guides/cross-­‐platform/test_cloud/calabash/intro_to_calabash/) • Jenkins (http://jenkins-­‐ci.org/) • plugins: Cucumber-­‐reports, Cobertura (code coverage), Build monitor view • RubyMine (http://www.jetbrains.com/ruby/) • Uncle Bobs Clean Code • because it’s a great book that promotes craftsmanship eBay Inc. Confidential 27