Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Copyright by QualityMinds
Ron Werner, Mobile Testing Lead
Dragons and Knights
Calabash and Cucumber as Automation Tools
fo...
Copyright by QualityMinds
About me:
2
Mobile Testing Lead @ QualityMinds, Munich
8 years of experience in Testing, 15 year...
Copyright by QualityMinds
My Mission: Automation of a Hybrid App
3
conject AG:
Leading software company
for the „Plan Buil...
Copyright by QualityMinds
Copyright by QualityMinds 5
uiautomator
KIF
Cross-Platform Testing
iOS & Android
Supports Hybrid
Survives POC
1.
2.
3.
○
○...
Copyright by QualityMinds 6
uiautomator
KIF
Cross-Platform Testing
iOS & Android
Supports Hybrid
Survives POC
1.
2.
3.
Cho...
Copyright by QualityMinds 7
Cross-Platform Testing
iOS & Android
Supports Hybrid
Survives POC
1.
2.
3.
○
○
○
Choice of Wea...
Copyright by QualityMinds
And the winner is:
8
$%
&
Copyright by QualityMinds
Calabash! Ruby‘s integrated. Oh, and Cucumber.
9
Copyright by QualityMinds
It‘s all go! Battle briefing.
10
Copyright by QualityMinds 11
Ruby Console (irb)
Chrome Inspect / Safari InspectorDevice/Simulator/Emulator
It‘s all go! Ba...
Copyright by QualityMinds
Key to success: a cunning plan to conquer the castle
with as little effort (and bloodshed) as po...
Copyright by QualityMinds
Attack!
13
Instrumented intrusion via the main
access door, embedded into the
(hay) stack
Þ Succ...
Copyright by QualityMinds
Obstacle #1: Open the lock
14
Þ Login Screen: set_text() has no effect
Þ Keyboard needs to trigg...
Copyright by QualityMinds
Obstacle #2: Scrolling & Webviews (iOS)
15
Copyright by QualityMinds
Obstacle #2: Scrolling & Webviews (iOS)
16
Þ Addressing correct Webviews and Scrollviews
Þ Andro...
Copyright by QualityMinds
Obstacle #3: Rien ne va plus
17
iOS defeated, Android tackled... but then there‘s a setback:
Not...
Copyright by QualityMinds 18
Þ Open Source effect:
Fixes coming in after a while
Þ Crosswalk > v15 now supported
from Cala...
Copyright by QualityMinds
Done!
19
• Evaluation & POC
cross-platform iOS &
Android with
20 POs, 12 feature files
• Runs as...
Copyright by QualityMinds
Calabash X-Platform
20
DEMO
Copyright by QualityMinds
Requirements for X-Platform Calabash
21
• Ruby >= 2.0 (latest is preferred)
• Gems: calabash, ca...
Copyright by QualityMinds 22
Feature files with Scenarios
(”Given – When – Then“)
Glue code in Step files
Calabash impleme...
Copyright by QualityMinds 23
Open source software means:
• contribution
• community
• help
• empowerment
LEARNING #1
Copyright by QualityMinds 24
Keep your automation
code tidy!
LEARNING #2
Copyright by QualityMinds 25
If everything else goes wrong...
Kännykänheiton
Maailmanmestaruuskilpailut
Mobile Phone Throw...
Copyright by QualityMinds 26
APP Y
END
Questions?
Answers!
...also later, if you like! Get in touch:
! ron.werner@qualitym...
Upcoming SlideShare
Loading in …5
×

Dragons & Knights - Calabash and Cucumber as Automation Tools for Hybrid Apps on iOS & Android

114 views

Published on

Slides for the demo talk Ron Werner gave at European Testing Conference 2017 (Feb 8-10).
Consists of two parts: a) the story (which you need to hear live), and b) the cross-device iOS and Android automation live demo

Published in: Mobile
  • Be the first to comment

  • Be the first to like this

Dragons & Knights - Calabash and Cucumber as Automation Tools for Hybrid Apps on iOS & Android

  1. 1. Copyright by QualityMinds Ron Werner, Mobile Testing Lead Dragons and Knights Calabash and Cucumber as Automation Tools for Hybrid Apps on iOS & Android 1
  2. 2. Copyright by QualityMinds About me: 2 Mobile Testing Lead @ QualityMinds, Munich 8 years of experience in Testing, 15 years in IT Married, 3 sons Pareto-vegan Weirdest experience: Testing in Japanese: ! ron.werner@qualityminds.de " @ron_werner
  3. 3. Copyright by QualityMinds My Mission: Automation of a Hybrid App 3 conject AG: Leading software company for the „Plan Build Operate“ Lifecycle in Construction Management conjectPM: Hybrid App (iOS & Android) Uses webviews (HTML) and native plugins (e.g. date picker, QR code reader, slide-in menu, etc.)
  4. 4. Copyright by QualityMinds
  5. 5. Copyright by QualityMinds 5 uiautomator KIF Cross-Platform Testing iOS & Android Supports Hybrid Survives POC 1. 2. 3. ○ ○ ○ Choice of Weapons
  6. 6. Copyright by QualityMinds 6 uiautomator KIF Cross-Platform Testing iOS & Android Supports Hybrid Survives POC 1. 2. 3. Choice of Weapons
  7. 7. Copyright by QualityMinds 7 Cross-Platform Testing iOS & Android Supports Hybrid Survives POC 1. 2. 3. ○ ○ ○ Choice of Weapons
  8. 8. Copyright by QualityMinds And the winner is: 8 $% &
  9. 9. Copyright by QualityMinds Calabash! Ruby‘s integrated. Oh, and Cucumber. 9
  10. 10. Copyright by QualityMinds It‘s all go! Battle briefing. 10
  11. 11. Copyright by QualityMinds 11 Ruby Console (irb) Chrome Inspect / Safari InspectorDevice/Simulator/Emulator It‘s all go! Battle briefing.
  12. 12. Copyright by QualityMinds Key to success: a cunning plan to conquer the castle with as little effort (and bloodshed) as possible ü BDD: Feature Files & Step Definitions, iOS- and Android-specific implementation ü Page Objects for iOS/Android – keeping maintenance cost low ü Code reuse (DRY) Battle Strategy 12
  13. 13. Copyright by QualityMinds Attack! 13 Instrumented intrusion via the main access door, embedded into the (hay) stack Þ Success: Instrumentation works without any noticeable performance deterioration I love it when a plan comes together!
  14. 14. Copyright by QualityMinds Obstacle #1: Open the lock 14 Þ Login Screen: set_text() has no effect Þ Keyboard needs to trigger event to register entry Þ Using „real“ text entry via keyboard works... Open Sesame! ○ ○
  15. 15. Copyright by QualityMinds Obstacle #2: Scrolling & Webviews (iOS) 15
  16. 16. Copyright by QualityMinds Obstacle #2: Scrolling & Webviews (iOS) 16 Þ Addressing correct Webviews and Scrollviews Þ Android: works as designed Þ Scrolling on iOS turns out to be complex: panning instead of real scrolling Þ App requires triggering of touch events on correct scrollView Þ Lengthy search for a workaround (combo Swipe & Touch) ○ ○
  17. 17. Copyright by QualityMinds Obstacle #3: Rien ne va plus 17 iOS defeated, Android tackled... but then there‘s a setback: Nothing goes: Android tests fail all of a sudden. Þ New framework was introduced: crosswalk v15 for Android Þ Our hero is powerless... this version is not yet supported Þ Workaround: remove framework before testing... unsatisfactory!!
  18. 18. Copyright by QualityMinds 18 Þ Open Source effect: Fixes coming in after a while Þ Crosswalk > v15 now supported from Calabash-Android 0.8.0 Þ Actual solution: would have been easy to fix!! Obstacle #3: Rien ne va plus (Android)
  19. 19. Copyright by QualityMinds Done! 19 • Evaluation & POC cross-platform iOS & Android with 20 POs, 12 feature files • Runs as daily build in Teamcity CI on real Android & iOS devices • Dragon defeated! 3 critical bugs found right before next release
  20. 20. Copyright by QualityMinds Calabash X-Platform 20 DEMO
  21. 21. Copyright by QualityMinds Requirements for X-Platform Calabash 21 • Ruby >= 2.0 (latest is preferred) • Gems: calabash, calabash-android (latest preferred) • iOS Device >= 7.1 • iOS Simulator >= 8.0 • Android Emulator / Device (API Level >= 17) • Mac OS • Xcode 7/8 • Java SDK 8 • Android SDK % (
  22. 22. Copyright by QualityMinds 22 Feature files with Scenarios (”Given – When – Then“) Glue code in Step files Calabash implementation in Page Objects BDD Approach (Cucumber):
  23. 23. Copyright by QualityMinds 23 Open source software means: • contribution • community • help • empowerment LEARNING #1
  24. 24. Copyright by QualityMinds 24 Keep your automation code tidy! LEARNING #2
  25. 25. Copyright by QualityMinds 25 If everything else goes wrong... Kännykänheiton Maailmanmestaruuskilpailut Mobile Phone Throwing World Championships 11 March, 2017 www.mobilephonethrowing.fi LEARNING #3
  26. 26. Copyright by QualityMinds 26 APP Y END Questions? Answers! ...also later, if you like! Get in touch: ! ron.werner@qualityminds.de " @ron_werner TM

×