SlideShare une entreprise Scribd logo
1  sur  49
Télécharger pour lire hors ligne
Green Light for the Apps! 
Using Calaba.sh @Meetic 
DroidCon Paris 
September 23rd 2014 
Cédric Creusot 
Jean-Loup Yu
About us 
Cédric Creusot 
Android Developer 
Meetic HQ 
@Calimeraw 
Jean-Loup Yu 
Head of Mobile Development 
Meetic HQ 
@djelmen
Agenda 
About Meetic 
Mobile @Meetic 
Green light to submit 
Why Calaba.sh? 
Hands on 
Experience Sharing
About Meetic 
The French Success Story
The Success Story 
founded by Marc Simoncini 
of dating service in Europe 
of unique visitors / month 
countries covered by Meetic Service 
events organized by Meetic 
employees 
2001 
#1 
7 millions 
17 
>1000 
380
Mobile @Meetic 
Scaling in 2014
Mobile Apps Team – start of 2014 
Tech 
Product 
Design 
4 
2 
1
Mobile Apps Team - now 
Tech 
Product 
Design 
14 
3 
3
Mobile Apps Team Scope 
Android 
iOS 
Windows 
API – Web Services
Mobile Team 
Organization 
One single open 
space 
Cross functional 
Team
Mobile Team 
Organization 
Agile 
From Concept To 
Store
Mobile Team 
Organization 
Agile 
From Concept To 
Store
Mobile Team 
Organization 
Agile 
From Concept To 
Store
Mobile Team 
Organization 
Agile 
From Concept To 
Store
Green light to submit 
Apps Quality Status
Code Quality 
• Readable 
• Unit Tested 
• Smart Architecture 
• Maintenable
Functional Quality 
• The code do what we want 
• Work with external 
components
Different Type of Test 
• Unit Test 
• Integration Test 
• Functional Test
Different Type of Test 
• Unit Test 
• Integration Test 
• Functional Test
Functional Test Tools
Why Calaba.sh? 
The Functional Tool Choice
Specification written with Gherkin 
All the test cases in Meetic 
look like: 
• Given <the context> 
• When <users do actions> 
• Then <expected result>
Multi-platform Support 
Android 
iOS
Mature 
• Open Sourced since February 2012 
• Based on Cucumber 
• Born in 2008 
• Over 200 contributors 
• Backed and developed by Xamarin
Hands On 
Code inside
The Feature Scenario 
@login! 
Feature: Login feature! 
As a Meetic user! 
In order to enjoy the service! 
I want to be able to log into the service! 
! 
Scenario: Wrong Login! 
Given I am on the Login screen! 
When I enter my credentials calabash_error@calabash.com and foobar! 
And I press confirm! 
Then I should see an error message!
The Feature Scenario 
@login! 
Feature: Login feature! 
As a Meetic user! 
In order to enjoy the service! 
I want to be able to log into the service! 
! 
Scenario: Wrong Login! 
Given I am on the Login screen! 
When I enter my credentials calabash_error@calabash.com and foobar! 
And I press confirm! 
Then I should see an error message!
The Feature Scenario 
@login! 
Feature: Login feature! 
As a Meetic user! 
In order to enjoy the service! 
I want to be able to log into the service! 
! 
Scenario: Wrong Login! 
Given I am on the Login screen! 
When I enter my credentials calabash_error@calabash.com and foobar! 
And I press confirm! 
Then I should see an error message!
The Feature Scenario 
@login! 
Feature: Login feature! 
As a Meetic user! 
In order to enjoy the service! 
I want to be able to log into the service! 
! 
Scenario: Wrong Login! 
Given I am on the Login screen! 
When I enter my credentials calabash_error@calabash.com and foobar! 
And I press confirm! 
Then I should see an error message!
The Android Source Code – non intrusive
An example step definition – the glue 
When(/^I enter my credentials (S*) and (S*)$/) do |login, password|! 
wait_for_screen :login! 
! 
step 'I enter text "" into field with id "loginEdit"'! 
step "I enter text "#{login}" into field with id "loginEdit""! 
step 'I enter text "" into field with id "passwordEdit"'! 
step "I enter text "#{password}" into field with id "passwordEdit""! 
end! 
! 
! 
!
Run!
The result – human readable
How does it works? 
Step definitions, 
Ruby client library 
Features 
Running environment 
Instrumentation 
Test server 
Your app 
Devices/Emulators 
Source: http://blog.lesspainful.com/2012/03/07/Calabash-Android/
The commands 
Installation 
$>sudo gem install calabash-android! 
Setup 
$your_android_project_dir>calabash-android gen! 
Run tests 
$>calabash-android resign <your apk>! 
$>calabash-android run <your apk>! 
$>ADB_DEVICE_ARG=<your device> calabash-android run <your apk>! 
! 
Better format output 
$>calabash-android run <your apk> --format html --out result.html! 
! 
!
Industrialization
Automated Tests 
• Map of our code 
• Ease the issue localisation
Continuous Integration 
>
Experience Sharing
Multi Language 
• 12 languages management 
• 4 brands 
Calabash Ruby API 
backdoor(method,arg) 
1
Backdoor with calabash 
• Need to run only when we are using calabash 
• The backdoor can call method only in the current 
activity tested 
Create a specific target for Calabash 
1
In your Android app 
public class MainActivitiy extends Activity {! 
public String calabashGetStringById(String stringId) {! 
String stringToReturn = “”;! 
if (id != null && !id.isEmpty()) {! 
Resources resources = getResources();! 
int resourceId = resources.getIdentifier(stringId, “string”, getPackageName());! 
stringToReturn = resources.getString(resourceId);! 
}! 
return stringToReturn;! 
} ! 
}! 
1
In your glue 
Given(/^I see the title “([^”]*)”$/) do |key_string|! 
title = backdoor(“calabashGetStringById”, key_string)! 
wait_for_text(title)! 
end! 
1
Execution Time 
• Take time to execute the test 
• During Dev, need to be productive 
Use label 
$>calabash-android run <your apk> --tags <your tags>! 
Example 
$>calabash-android run myapp.apk --tags @login! 
2
Dedicated Environment 
• Control the Data Set 
• Setup the Back End 
Huge amount of work! 
Mock usage 
3
Behavior Driven Development 
• Write the expected Behavior in human language before 
implementation 
• User centric 
• Use concrete examples 
• No context 
Work closely with Product and Dev 
Define a company dictionary for the test 
4
Functional Test Cover 
• Functional tests need to stay maintenable 
• Don’t cover all the cases with automatic tests! 
Automatic tests of the main cases 
• Main path of the customers 
• Nominal cases 
Manual Testing needed for specific cases 
5
Conclusion 
We are hiring! 
http://jobs.meetic.fr/
Any Question ? 
Thanks!

Contenu connexe

Tendances

Rowdy Rabouw - Unleash your web skills on native
Rowdy Rabouw - Unleash your web skills on nativeRowdy Rabouw - Unleash your web skills on native
Rowdy Rabouw - Unleash your web skills on native
OdessaJS Conf
 
Ruby conf 2011, Create your own rails framework
Ruby conf 2011, Create your own rails frameworkRuby conf 2011, Create your own rails framework
Ruby conf 2011, Create your own rails framework
Pankaj Bhageria
 

Tendances (20)

Annotations in Java
Annotations in JavaAnnotations in Java
Annotations in Java
 
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
 
Testing AngularJS
Testing AngularJSTesting AngularJS
Testing AngularJS
 
Using API Platform to build ticketing system #symfonycon
Using API Platform to build ticketing system #symfonyconUsing API Platform to build ticketing system #symfonycon
Using API Platform to build ticketing system #symfonycon
 
Outside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and RspecOutside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and Rspec
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
Cucumber Ru09 Web
Cucumber Ru09 WebCucumber Ru09 Web
Cucumber Ru09 Web
 
Rails antipatterns
Rails antipatternsRails antipatterns
Rails antipatterns
 
Rails antipattern-public
Rails antipattern-publicRails antipattern-public
Rails antipattern-public
 
Rowdy Rabouw - Unleash your web skills on native
Rowdy Rabouw - Unleash your web skills on nativeRowdy Rabouw - Unleash your web skills on native
Rowdy Rabouw - Unleash your web skills on native
 
jQuery Intro
jQuery IntrojQuery Intro
jQuery Intro
 
Introduction to Ruby On Rails
Introduction to Ruby On RailsIntroduction to Ruby On Rails
Introduction to Ruby On Rails
 
Working with Adwords scripts for reporting with AWQL
Working with Adwords scripts for reporting with AWQLWorking with Adwords scripts for reporting with AWQL
Working with Adwords scripts for reporting with AWQL
 
Crafting Quality PHP Applications (ConFoo YVR 2017)
Crafting Quality PHP Applications (ConFoo YVR 2017)Crafting Quality PHP Applications (ConFoo YVR 2017)
Crafting Quality PHP Applications (ConFoo YVR 2017)
 
Introduccion app engine con python
Introduccion app engine con pythonIntroduccion app engine con python
Introduccion app engine con python
 
Ruby conf 2011, Create your own rails framework
Ruby conf 2011, Create your own rails frameworkRuby conf 2011, Create your own rails framework
Ruby conf 2011, Create your own rails framework
 
Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...
 
Crafting Quality PHP Applications (Bucharest Tech Week 2017)
Crafting Quality PHP Applications (Bucharest Tech Week 2017)Crafting Quality PHP Applications (Bucharest Tech Week 2017)
Crafting Quality PHP Applications (Bucharest Tech Week 2017)
 
Exception mapping using api kit
Exception mapping using api kitException mapping using api kit
Exception mapping using api kit
 
Intro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaIntro to Rails Give Camp Atlanta
Intro to Rails Give Camp Atlanta
 

En vedette

Belajar android studio dengan membuat aplikasi android sederhana
Belajar android studio dengan membuat aplikasi android sederhanaBelajar android studio dengan membuat aplikasi android sederhana
Belajar android studio dengan membuat aplikasi android sederhana
slempase
 

En vedette (19)

Pengontrol kecerahan lampu pijar menggunakan aplikasi android berbasis arduin...
Pengontrol kecerahan lampu pijar menggunakan aplikasi android berbasis arduin...Pengontrol kecerahan lampu pijar menggunakan aplikasi android berbasis arduin...
Pengontrol kecerahan lampu pijar menggunakan aplikasi android berbasis arduin...
 
Tugas besar
Tugas besarTugas besar
Tugas besar
 
E banking and M-banking
E banking and M-bankingE banking and M-banking
E banking and M-banking
 
Android Training For Beginner @DILO Bandung
Android Training For Beginner @DILO BandungAndroid Training For Beginner @DILO Bandung
Android Training For Beginner @DILO Bandung
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android login example
Android login exampleAndroid login example
Android login example
 
Tutorial Cara Membuat Aplikasi RSS Android - creatorb
Tutorial Cara Membuat Aplikasi RSS Android - creatorbTutorial Cara Membuat Aplikasi RSS Android - creatorb
Tutorial Cara Membuat Aplikasi RSS Android - creatorb
 
Membuat Aplikasi Android Keren
Membuat Aplikasi Android KerenMembuat Aplikasi Android Keren
Membuat Aplikasi Android Keren
 
Ebook tutorial pemrograman android
Ebook tutorial pemrograman android Ebook tutorial pemrograman android
Ebook tutorial pemrograman android
 
Android Workshop beginner
Android Workshop beginnerAndroid Workshop beginner
Android Workshop beginner
 
Belajar android studio dengan membuat aplikasi android sederhana
Belajar android studio dengan membuat aplikasi android sederhanaBelajar android studio dengan membuat aplikasi android sederhana
Belajar android studio dengan membuat aplikasi android sederhana
 
Kenalan Dengan Firebase Android
Kenalan Dengan Firebase AndroidKenalan Dengan Firebase Android
Kenalan Dengan Firebase Android
 
Android Fast Track CRUD Android PHP MySql
Android Fast Track CRUD Android PHP MySqlAndroid Fast Track CRUD Android PHP MySql
Android Fast Track CRUD Android PHP MySql
 
Belajar Android PHP MySQL Login dengan Volley
Belajar Android PHP MySQL Login dengan VolleyBelajar Android PHP MySQL Login dengan Volley
Belajar Android PHP MySQL Login dengan Volley
 
Belajar Android Studio CRUD Data Mahasiswa
Belajar Android Studio CRUD Data MahasiswaBelajar Android Studio CRUD Data Mahasiswa
Belajar Android Studio CRUD Data Mahasiswa
 
Cara Membuat Aplikasi Android Resep Masakan Sederhana Android-SQLite
Cara Membuat Aplikasi Android Resep Masakan Sederhana Android-SQLiteCara Membuat Aplikasi Android Resep Masakan Sederhana Android-SQLite
Cara Membuat Aplikasi Android Resep Masakan Sederhana Android-SQLite
 
Belajar Android Studio Material Design Penggunaan RecyclerView dan Card View
Belajar Android Studio Material Design Penggunaan RecyclerView dan Card ViewBelajar Android Studio Material Design Penggunaan RecyclerView dan Card View
Belajar Android Studio Material Design Penggunaan RecyclerView dan Card View
 
Belajar Android Membuat Katalog Produk
Belajar Android Membuat Katalog ProdukBelajar Android Membuat Katalog Produk
Belajar Android Membuat Katalog Produk
 
Tutorial Lengkap Cara Membuat Aplikasi Android Sederhana
Tutorial Lengkap Cara Membuat Aplikasi Android SederhanaTutorial Lengkap Cara Membuat Aplikasi Android Sederhana
Tutorial Lengkap Cara Membuat Aplikasi Android Sederhana
 

Similaire à Green Light for the Apps with Calaba.sh - DroidCon Paris 2014

Google I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb HighlightsGoogle I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb Highlights
Romain Guy
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructure
Lindsay Holmwood
 

Similaire à Green Light for the Apps with Calaba.sh - DroidCon Paris 2014 (20)

Rubyconf2016 - Solving communication problems in distributed teams with BDD
Rubyconf2016 - Solving communication problems in distributed teams with BDDRubyconf2016 - Solving communication problems in distributed teams with BDD
Rubyconf2016 - Solving communication problems in distributed teams with BDD
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
 
Android testing calabash
Android testing calabashAndroid testing calabash
Android testing calabash
 
Xamarin.Android Introduction
Xamarin.Android IntroductionXamarin.Android Introduction
Xamarin.Android Introduction
 
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
 
Telerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT ConferenceTelerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT Conference
 
"Managing API Complexity". Matthew Flaming, Temboo
"Managing API Complexity". Matthew Flaming, Temboo"Managing API Complexity". Matthew Flaming, Temboo
"Managing API Complexity". Matthew Flaming, Temboo
 
Google I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb HighlightsGoogle I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb Highlights
 
Intro to appcelerator
Intro to appceleratorIntro to appcelerator
Intro to appcelerator
 
Automating android
Automating androidAutomating android
Automating android
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructure
 
Testdroid:
Testdroid: Testdroid:
Testdroid:
 
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
 
Android Quiz App – Test Your IQ.pdf
Android Quiz App – Test Your IQ.pdfAndroid Quiz App – Test Your IQ.pdf
Android Quiz App – Test Your IQ.pdf
 
How React Native Appium and me made each other shine
How React Native Appium and me made each other shineHow React Native Appium and me made each other shine
How React Native Appium and me made each other shine
 
Creating a Responsive Website From Scratch
Creating a Responsive Website From ScratchCreating a Responsive Website From Scratch
Creating a Responsive Website From Scratch
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile design
 
APIs for modern web apps
APIs for modern web appsAPIs for modern web apps
APIs for modern web apps
 
Iphone Presentation for MuMe09
Iphone Presentation for MuMe09Iphone Presentation for MuMe09
Iphone Presentation for MuMe09
 
Developing for LinkedIn's Application Platform
Developing for LinkedIn's Application PlatformDeveloping for LinkedIn's Application Platform
Developing for LinkedIn's Application Platform
 

Dernier

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Dernier (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 

Green Light for the Apps with Calaba.sh - DroidCon Paris 2014

  • 1. Green Light for the Apps! Using Calaba.sh @Meetic DroidCon Paris September 23rd 2014 Cédric Creusot Jean-Loup Yu
  • 2. About us Cédric Creusot Android Developer Meetic HQ @Calimeraw Jean-Loup Yu Head of Mobile Development Meetic HQ @djelmen
  • 3. Agenda About Meetic Mobile @Meetic Green light to submit Why Calaba.sh? Hands on Experience Sharing
  • 4. About Meetic The French Success Story
  • 5. The Success Story founded by Marc Simoncini of dating service in Europe of unique visitors / month countries covered by Meetic Service events organized by Meetic employees 2001 #1 7 millions 17 >1000 380
  • 7. Mobile Apps Team – start of 2014 Tech Product Design 4 2 1
  • 8. Mobile Apps Team - now Tech Product Design 14 3 3
  • 9. Mobile Apps Team Scope Android iOS Windows API – Web Services
  • 10. Mobile Team Organization One single open space Cross functional Team
  • 11. Mobile Team Organization Agile From Concept To Store
  • 12. Mobile Team Organization Agile From Concept To Store
  • 13. Mobile Team Organization Agile From Concept To Store
  • 14. Mobile Team Organization Agile From Concept To Store
  • 15. Green light to submit Apps Quality Status
  • 16. Code Quality • Readable • Unit Tested • Smart Architecture • Maintenable
  • 17. Functional Quality • The code do what we want • Work with external components
  • 18. Different Type of Test • Unit Test • Integration Test • Functional Test
  • 19. Different Type of Test • Unit Test • Integration Test • Functional Test
  • 21. Why Calaba.sh? The Functional Tool Choice
  • 22. Specification written with Gherkin All the test cases in Meetic look like: • Given <the context> • When <users do actions> • Then <expected result>
  • 24. Mature • Open Sourced since February 2012 • Based on Cucumber • Born in 2008 • Over 200 contributors • Backed and developed by Xamarin
  • 25. Hands On Code inside
  • 26. The Feature Scenario @login! Feature: Login feature! As a Meetic user! In order to enjoy the service! I want to be able to log into the service! ! Scenario: Wrong Login! Given I am on the Login screen! When I enter my credentials calabash_error@calabash.com and foobar! And I press confirm! Then I should see an error message!
  • 27. The Feature Scenario @login! Feature: Login feature! As a Meetic user! In order to enjoy the service! I want to be able to log into the service! ! Scenario: Wrong Login! Given I am on the Login screen! When I enter my credentials calabash_error@calabash.com and foobar! And I press confirm! Then I should see an error message!
  • 28. The Feature Scenario @login! Feature: Login feature! As a Meetic user! In order to enjoy the service! I want to be able to log into the service! ! Scenario: Wrong Login! Given I am on the Login screen! When I enter my credentials calabash_error@calabash.com and foobar! And I press confirm! Then I should see an error message!
  • 29. The Feature Scenario @login! Feature: Login feature! As a Meetic user! In order to enjoy the service! I want to be able to log into the service! ! Scenario: Wrong Login! Given I am on the Login screen! When I enter my credentials calabash_error@calabash.com and foobar! And I press confirm! Then I should see an error message!
  • 30. The Android Source Code – non intrusive
  • 31. An example step definition – the glue When(/^I enter my credentials (S*) and (S*)$/) do |login, password|! wait_for_screen :login! ! step 'I enter text "" into field with id "loginEdit"'! step "I enter text "#{login}" into field with id "loginEdit""! step 'I enter text "" into field with id "passwordEdit"'! step "I enter text "#{password}" into field with id "passwordEdit""! end! ! ! !
  • 32. Run!
  • 33. The result – human readable
  • 34. How does it works? Step definitions, Ruby client library Features Running environment Instrumentation Test server Your app Devices/Emulators Source: http://blog.lesspainful.com/2012/03/07/Calabash-Android/
  • 35. The commands Installation $>sudo gem install calabash-android! Setup $your_android_project_dir>calabash-android gen! Run tests $>calabash-android resign <your apk>! $>calabash-android run <your apk>! $>ADB_DEVICE_ARG=<your device> calabash-android run <your apk>! ! Better format output $>calabash-android run <your apk> --format html --out result.html! ! !
  • 37. Automated Tests • Map of our code • Ease the issue localisation
  • 40. Multi Language • 12 languages management • 4 brands Calabash Ruby API backdoor(method,arg) 1
  • 41. Backdoor with calabash • Need to run only when we are using calabash • The backdoor can call method only in the current activity tested Create a specific target for Calabash 1
  • 42. In your Android app public class MainActivitiy extends Activity {! public String calabashGetStringById(String stringId) {! String stringToReturn = “”;! if (id != null && !id.isEmpty()) {! Resources resources = getResources();! int resourceId = resources.getIdentifier(stringId, “string”, getPackageName());! stringToReturn = resources.getString(resourceId);! }! return stringToReturn;! } ! }! 1
  • 43. In your glue Given(/^I see the title “([^”]*)”$/) do |key_string|! title = backdoor(“calabashGetStringById”, key_string)! wait_for_text(title)! end! 1
  • 44. Execution Time • Take time to execute the test • During Dev, need to be productive Use label $>calabash-android run <your apk> --tags <your tags>! Example $>calabash-android run myapp.apk --tags @login! 2
  • 45. Dedicated Environment • Control the Data Set • Setup the Back End Huge amount of work! Mock usage 3
  • 46. Behavior Driven Development • Write the expected Behavior in human language before implementation • User centric • Use concrete examples • No context Work closely with Product and Dev Define a company dictionary for the test 4
  • 47. Functional Test Cover • Functional tests need to stay maintenable • Don’t cover all the cases with automatic tests! Automatic tests of the main cases • Main path of the customers • Nominal cases Manual Testing needed for specific cases 5
  • 48. Conclusion We are hiring! http://jobs.meetic.fr/
  • 49. Any Question ? Thanks!