SlideShare uma empresa Scribd logo
1 de 22
Hello I’m

Utsav
SOFTWARE DEVELOPMENT DONE RIGHT
Netherlands | USA | India | France | UK

www.xebia.in; Blog :http://.xebee.xebia.in
Mobile App
Automated
Acceptance
Testing
Utsav Sinha
Problems
• Development and Maintenance
• Adaptable to changes

• Accuracy
• Completeness
Automated Testing Desiderata
• Use Cases are the Test Cases.
• Robust
• Realistic Environment
(Real Devices, Multiple OS Versions….)
• Continuous Integration
• Comprehensive Test report for each step.
•

Flexible Report output formats.
• Cucumber Provides
o a framework for writing software specifications
o a tool for executing those specifications.

• Specifications are written DSLs
• Works with Ruby, Java, .NET, Flex and many more
• http://cukes.info/
Example – Feature
Step Definition
• Make Cucumber Tests come alive.
• Written in various Programming Language (mostly
Ruby)
Calabash
• One Interface Cucumber for iOS and Android
o Reuse of Test Cross Platform (iOS and Android)

•
•
•
•
•

Targets Native and Hybrid apps for Android and iOS
Runs on Physical Device
Support for Hybrid Apps (embedded web-views)
Open Source Tool
Cross Platform Testing
Calabash iOS architecture
•

Calabash tests are executed with the
Cucumber tool and consist of two parts:

•

Client Library written in Ruby

•

Calabash.framework, a server
framework written in Objective-C
Calabash iOS
• To use Calabash we make a special test target in
Xcode that links with calabash.framework
• The Server Framework starts HTTP Server inside the
App, that listens to the request from Client Library.
• The Cucumber tool executes the feature file that
represents the intended behaviour of the App
Under Test.
• The Feature Files contains steps (Predefined or
Custom)
Calabash Androidarchitecture
• Features
• Step-Definitions
• Instrumentation Test
Server: This is another
app which will be
installed and executed
into device.
Calabash iOS
• App is built for Testing by linking a static library
(calabash-server)
o Uses a combination of UIAutomation and other APIs

• Supports Interactive test-development
• Based on Frank but changes some core parts.
o Setting up Frank Requires modification of the app source, inclusion of static
resources and source files manually, where as Calabash has Automated Set
Up. 3 commands and we are done

• Touch Synthesis supports multi-touch, gestures
• Can use device accessibility for identifying views
Queries
•
•
•
•

Explore the App Interactively
Run Command „calabash-ios console‟
It gives us a Calabash console (it is just a Ruby irb with calabash
loaded)
Example irb(main):001:0> query("button")
[0] {

},

"class" => "UIButton",
"frame" => {
"y" => 20,
"width" => 101,
"x" => 20,
"height" => 101

"UIType" => "UIControl",
"description" => "<UIButton: 0x4cc1120; frame = (20 20; 101 101); opaque = NO; autoresize =
RM+BM; layer = <CALayer: 0x4c89cc0>>"
},
Returns an array with objects that are descriptions of the buttons in the current screen in your app
Queries
• The query function
o takes a string query as an argument.
o the query argument is similar to a css selector

• The syntax for queries is based on UIScript,
o but is a new implementation with additional features added (and some
removed).

• UIScript gives a nice "CSS-selector" like approach to
finding view objects in your app screens.
irb(main):001:0> query("tabBarButton").count
=> 4
irb(main):002:0> query("tabBarButton")[0]
=> {"class"=>"UITabBarButton", "frame"=>{"y"=>1, "width"=>76, "x"=>2, "height"=>48},
"UIType"=>"UIControl", "description"=>"<UITabBarButton: 0x856a820; frame = (2 1; 76
48); opaque = NO; layer = <CALayer: 0x856d210>>" }
Let’s test…
Prototype gestures
• Calabash iOS has a number of built-in event
sequences that can be played back.
o (touch, swipe, pinch, etc)

• Events can be relocated (translated) to different
views, and optionally offsets.
• Extensible: you can record your own gestures if
none of the built in suits you.
Summary
•

Calabash iOS tradeoffs and mitigations DSLs: Cucumber, and Query
language (decl, high level)

•

Full power of Ruby in tests

•

Advanced touch synthesis
o
o

recordings give some brittleness, which is
mitigated by supporting relocating and manipulating of recorded event sequences (which are just lists of
dictionaries).

•

Interactive development experience

•

Requires linking of a framework

•

Not good for some games (randomness, “gameplay” & “feel”, timing
critical)

•

Not good for Phone-to-Phone coordination (call, text, bluetooth)
Thank You!!
Utsav Sinha
usinha@xebia.com
References
• https://github.com/calabash
• https://github.com/calabash/calabash-ios
• https://github.com/calabash/calabash-ios/wiki
• https://github.com/calabash/calabash-ios-server
Agile Testing

Current Competencies
Mobile Testing: Appium, Calabash
Performance Testing Tools: JMeter, LoadUI

Automation Frameworks in place
- Selenium/Webdriver keyword driven
- SoapUI

ATDD Tools: Cucumber, Fitnesse, JBehave,
Geb
Language Proficiencies: Java, Ruby, Groovy, Python
Functional automation Tools: Selenium/Webdriver, AUTO IT, SoapUI, QTP
Knowledge Sharing: Speakers in national and international conferences
Contact us @

Websites

www.xebia.in
www.xebia.com
www.xebia.fr

Xebia India

infoindia@xebia.com

Thought
Leadership

Htto://xebee.xebia.in
http://blog.xebia.com
http://podcast.xebia.com

Mais conteúdo relacionado

Mais de Xebia IT Architects

Xebia e-Commerce / mCommerce Solutions
Xebia e-Commerce / mCommerce SolutionsXebia e-Commerce / mCommerce Solutions
Xebia e-Commerce / mCommerce Solutions
Xebia IT Architects
 
A warm and prosperous Happy Diwali to all our clients
A warm and prosperous Happy Diwali to all our clientsA warm and prosperous Happy Diwali to all our clients
A warm and prosperous Happy Diwali to all our clients
Xebia IT Architects
 

Mais de Xebia IT Architects (20)

#Continuous delivery with #Deployit
#Continuous delivery with #Deployit#Continuous delivery with #Deployit
#Continuous delivery with #Deployit
 
Continuous integration using thucydides(bdd) with selenium
Continuous integration using thucydides(bdd) with seleniumContinuous integration using thucydides(bdd) with selenium
Continuous integration using thucydides(bdd) with selenium
 
Battlefield agility
Battlefield agilityBattlefield agility
Battlefield agility
 
Fish!ing for agile teams
Fish!ing for agile teamsFish!ing for agile teams
Fish!ing for agile teams
 
Xebia-Agile consulting and training offerings
Xebia-Agile consulting and training offeringsXebia-Agile consulting and training offerings
Xebia-Agile consulting and training offerings
 
Xebia e-Commerce / mCommerce Solutions
Xebia e-Commerce / mCommerce SolutionsXebia e-Commerce / mCommerce Solutions
Xebia e-Commerce / mCommerce Solutions
 
Growth at Xebia
Growth at XebiaGrowth at Xebia
Growth at Xebia
 
A warm and prosperous Happy Diwali to all our clients
A warm and prosperous Happy Diwali to all our clientsA warm and prosperous Happy Diwali to all our clients
A warm and prosperous Happy Diwali to all our clients
 
"We Plan to double our headcount" - MD, Xebia India
"We Plan to double our headcount" - MD, Xebia India"We Plan to double our headcount" - MD, Xebia India
"We Plan to double our headcount" - MD, Xebia India
 
Agile 2.0 - Our Road to Mastery
Agile 2.0 - Our Road to MasteryAgile 2.0 - Our Road to Mastery
Agile 2.0 - Our Road to Mastery
 
Agile FAQs by Shrikant Vashishtha
Agile FAQs by Shrikant VashishthaAgile FAQs by Shrikant Vashishtha
Agile FAQs by Shrikant Vashishtha
 
Agile Team Dynamics by Bhavin Chandulal Javia
Agile Team Dynamics by Bhavin Chandulal JaviaAgile Team Dynamics by Bhavin Chandulal Javia
Agile Team Dynamics by Bhavin Chandulal Javia
 
Practicing Agile in Offshore Environment by Himanshu Seth & Imran Mir
Practicing Agile in Offshore Environment by Himanshu Seth & Imran MirPracticing Agile in Offshore Environment by Himanshu Seth & Imran Mir
Practicing Agile in Offshore Environment by Himanshu Seth & Imran Mir
 
Moving Gradually to Agile Development by Kavita Gupta
Moving Gradually to Agile Development by Kavita GuptaMoving Gradually to Agile Development by Kavita Gupta
Moving Gradually to Agile Development by Kavita Gupta
 
AgileNCR 2010 coverage
AgileNCR 2010 coverageAgileNCR 2010 coverage
AgileNCR 2010 coverage
 
Kanban by Mayur Gupta
Kanban by Mayur GuptaKanban by Mayur Gupta
Kanban by Mayur Gupta
 
Agile vs Waterfall From A Tester's Eyes by Shweta Parashar & Abhishek Agrawal
Agile vs Waterfall From A Tester's Eyes by Shweta Parashar & Abhishek AgrawalAgile vs Waterfall From A Tester's Eyes by Shweta Parashar & Abhishek Agrawal
Agile vs Waterfall From A Tester's Eyes by Shweta Parashar & Abhishek Agrawal
 
What Made Paul A Great Product Owner
What Made Paul A Great Product OwnerWhat Made Paul A Great Product Owner
What Made Paul A Great Product Owner
 
Scaling Agile Hurts by Vibhu Srinivasan
Scaling Agile Hurts by Vibhu SrinivasanScaling Agile Hurts by Vibhu Srinivasan
Scaling Agile Hurts by Vibhu Srinivasan
 
Agile Team Smells : Early Detection and Fixes by Anurag Shrivastava
Agile Team Smells : Early Detection and Fixes by Anurag ShrivastavaAgile Team Smells : Early Detection and Fixes by Anurag Shrivastava
Agile Team Smells : Early Detection and Fixes by Anurag Shrivastava
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

Mobile App Automated Testing

  • 2. SOFTWARE DEVELOPMENT DONE RIGHT Netherlands | USA | India | France | UK www.xebia.in; Blog :http://.xebee.xebia.in
  • 4. Problems • Development and Maintenance • Adaptable to changes • Accuracy • Completeness
  • 5. Automated Testing Desiderata • Use Cases are the Test Cases. • Robust • Realistic Environment (Real Devices, Multiple OS Versions….) • Continuous Integration • Comprehensive Test report for each step. • Flexible Report output formats.
  • 6. • Cucumber Provides o a framework for writing software specifications o a tool for executing those specifications. • Specifications are written DSLs • Works with Ruby, Java, .NET, Flex and many more • http://cukes.info/
  • 8. Step Definition • Make Cucumber Tests come alive. • Written in various Programming Language (mostly Ruby)
  • 9. Calabash • One Interface Cucumber for iOS and Android o Reuse of Test Cross Platform (iOS and Android) • • • • • Targets Native and Hybrid apps for Android and iOS Runs on Physical Device Support for Hybrid Apps (embedded web-views) Open Source Tool Cross Platform Testing
  • 10. Calabash iOS architecture • Calabash tests are executed with the Cucumber tool and consist of two parts: • Client Library written in Ruby • Calabash.framework, a server framework written in Objective-C
  • 11. Calabash iOS • To use Calabash we make a special test target in Xcode that links with calabash.framework • The Server Framework starts HTTP Server inside the App, that listens to the request from Client Library. • The Cucumber tool executes the feature file that represents the intended behaviour of the App Under Test. • The Feature Files contains steps (Predefined or Custom)
  • 12. Calabash Androidarchitecture • Features • Step-Definitions • Instrumentation Test Server: This is another app which will be installed and executed into device.
  • 13. Calabash iOS • App is built for Testing by linking a static library (calabash-server) o Uses a combination of UIAutomation and other APIs • Supports Interactive test-development • Based on Frank but changes some core parts. o Setting up Frank Requires modification of the app source, inclusion of static resources and source files manually, where as Calabash has Automated Set Up. 3 commands and we are done • Touch Synthesis supports multi-touch, gestures • Can use device accessibility for identifying views
  • 14. Queries • • • • Explore the App Interactively Run Command „calabash-ios console‟ It gives us a Calabash console (it is just a Ruby irb with calabash loaded) Example irb(main):001:0> query("button") [0] { }, "class" => "UIButton", "frame" => { "y" => 20, "width" => 101, "x" => 20, "height" => 101 "UIType" => "UIControl", "description" => "<UIButton: 0x4cc1120; frame = (20 20; 101 101); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x4c89cc0>>" }, Returns an array with objects that are descriptions of the buttons in the current screen in your app
  • 15. Queries • The query function o takes a string query as an argument. o the query argument is similar to a css selector • The syntax for queries is based on UIScript, o but is a new implementation with additional features added (and some removed). • UIScript gives a nice "CSS-selector" like approach to finding view objects in your app screens. irb(main):001:0> query("tabBarButton").count => 4 irb(main):002:0> query("tabBarButton")[0] => {"class"=>"UITabBarButton", "frame"=>{"y"=>1, "width"=>76, "x"=>2, "height"=>48}, "UIType"=>"UIControl", "description"=>"<UITabBarButton: 0x856a820; frame = (2 1; 76 48); opaque = NO; layer = <CALayer: 0x856d210>>" }
  • 17. Prototype gestures • Calabash iOS has a number of built-in event sequences that can be played back. o (touch, swipe, pinch, etc) • Events can be relocated (translated) to different views, and optionally offsets. • Extensible: you can record your own gestures if none of the built in suits you.
  • 18. Summary • Calabash iOS tradeoffs and mitigations DSLs: Cucumber, and Query language (decl, high level) • Full power of Ruby in tests • Advanced touch synthesis o o recordings give some brittleness, which is mitigated by supporting relocating and manipulating of recorded event sequences (which are just lists of dictionaries). • Interactive development experience • Requires linking of a framework • Not good for some games (randomness, “gameplay” & “feel”, timing critical) • Not good for Phone-to-Phone coordination (call, text, bluetooth)
  • 20. References • https://github.com/calabash • https://github.com/calabash/calabash-ios • https://github.com/calabash/calabash-ios/wiki • https://github.com/calabash/calabash-ios-server
  • 21. Agile Testing Current Competencies Mobile Testing: Appium, Calabash Performance Testing Tools: JMeter, LoadUI Automation Frameworks in place - Selenium/Webdriver keyword driven - SoapUI ATDD Tools: Cucumber, Fitnesse, JBehave, Geb Language Proficiencies: Java, Ruby, Groovy, Python Functional automation Tools: Selenium/Webdriver, AUTO IT, SoapUI, QTP Knowledge Sharing: Speakers in national and international conferences
  • 22. Contact us @ Websites www.xebia.in www.xebia.com www.xebia.fr Xebia India infoindia@xebia.com Thought Leadership Htto://xebee.xebia.in http://blog.xebia.com http://podcast.xebia.com

Notas do Editor

  1. Functional and Acceptance tests• Actual app, as opposed to an isolated component• Often based on use-cases written in natural (domain) language• Visual appearance of app screens matter! (Design guidelines, etc)• As realistic an environment as practically possibleoften a manual process: repetitive, expensive• Many devices, screens, OS versions, languages
  2. Minimal Distance between Use Cases and Test Cases High Level (robust against minor UI changes)Supports Testing in Realistic Environment (Real Devices, Multiple OS Versions….)Supports Continuous IntegrationExecuting a test produces a test report for each step, did it succeed or not exception/error message if presentFlexible Report output formats Machine readable (XML, JSON,...) Human readable, console
  3. Cucumber Providesa framework for writing software specificationsa tool for executing those specifications. Specifications are written in a business readable language (DSL) that is close to natural language.Works with Ruby, Java, .NET, Flex or web applications written in any language. It has been translated to over 40 spoken languages.http://cukes.info/
  4. NarrativeIn order to ‘Conditon’As a RoleI want to ‘Verify’
  5. The Calabash client library makes HTTP requests to the server when it wants to do something with the current viewFeature files. The feature files describe the app use-cases you want to test. They are simultaneously a specification of the behaviour of your app and an executable test suite.