SlideShare a Scribd company logo
1 of 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

More Related Content

More from Xebia IT Architects

#Continuous delivery with #Deployit
#Continuous delivery with #Deployit#Continuous delivery with #Deployit
#Continuous delivery with #DeployitXebia IT Architects
 
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 seleniumXebia IT Architects
 
Xebia-Agile consulting and training offerings
Xebia-Agile consulting and training offeringsXebia-Agile consulting and training offerings
Xebia-Agile consulting and training offeringsXebia IT Architects
 
Xebia e-Commerce / mCommerce Solutions
Xebia e-Commerce / mCommerce SolutionsXebia e-Commerce / mCommerce Solutions
Xebia e-Commerce / mCommerce SolutionsXebia 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 clientsXebia IT Architects
 
"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 IndiaXebia IT Architects
 
Agile FAQs by Shrikant Vashishtha
Agile FAQs by Shrikant VashishthaAgile FAQs by Shrikant Vashishtha
Agile FAQs by Shrikant VashishthaXebia IT Architects
 
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 JaviaXebia IT Architects
 
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 MirXebia IT Architects
 
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 GuptaXebia IT Architects
 
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 AgrawalXebia IT Architects
 
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 OwnerXebia IT Architects
 
Scaling Agile Hurts by Vibhu Srinivasan
Scaling Agile Hurts by Vibhu SrinivasanScaling Agile Hurts by Vibhu Srinivasan
Scaling Agile Hurts by Vibhu SrinivasanXebia IT Architects
 
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 ShrivastavaXebia IT Architects
 

More from 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
 

Recently uploaded

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
 
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
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
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
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
[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
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
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
 
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
 
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
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 

Recently uploaded (20)

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
 
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
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
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
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
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
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
[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
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
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
 
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
 
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
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 

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

Editor's Notes

  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.