SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
Ti Calabash:
TiCalabash for Titanium: Fully Automated Testing.
!
Platino Talk?
Game Development with Titanium
https://github.com/gouldjw/tiConf-Mobile-Dev-Wars-Demo
https://vimeo.com/96590732
https://www.slideshare.net/gouldjw13/ticonf2014-gdtph-10may14ext
http://www.avatar-soft.com/#tiConf2014
Acceptance
Testing
Acceptance Testing
AKA
User Acceptance Testing
What is it?
Acceptance Testing
Test the entire App from the UI down rather
than Units (aka Unit Testing)
Unit Testing + Acceptance Testing === Outside-in BDD
<sidenote>
http://www.sarahmei.com/blog/2010/05/29/outside-in-bdd/
credit: http://lostechies.com
</sidenote>
Before Acceptance Testing
Some Pain Points
Many devices, OS versions, Languages, Form Factors,
Screen Density/Size…
Time consuming process of manually clicking
through screens.
Catch and stop regressions
The Original Vision
A Natural Language Like DSL
Extensible via ‘step definitions’
Supports Continuous Integration
No Titanium Modules
No touching tiapp.xml
Use only a Titanium CLI hook
No Ruby Dependencies
Calabash Overview
“Calabash supports Cucumber. Cucumber
lets us express the behavior of our app
using natural language that can be
understood by business experts and non-
technical QA staff.”
— Calaba.sh
“…Calabash is cross-platform, supporting
Android and iOS native apps…”
About that no Ruby thing…
TiCucumber was too much work for too little reward.
Matt Apperson had a better idea
TiCalabash
A Titanium CLI hook for Calabash
Calabash is Cucumber for Mobile
npm install -g ticalabash
https://github.com/appersonlabs/ticalabash
A Feature
This is executable code:
https://github.com/CodexLabs/alloy_fugitive/blob/master/features/fugitive.feature
Step Definitions
https://github.com/calabash/calabash-ios/blob/master/calabash-cucumber/features/step_definitions/calabash_steps.rb
https://github.com/calabash/calabash-android/tree/master/ruby-gem/lib/calabash-android/steps
An Example
Custom Step Definitions
Add your own steps:
Demo
Architecture of Calabash
FYI (for the curious)
features
Cucumber
(On Dev computer)
iOS/ Android App
Calabash library
(contains a web server
iOS: Frank
Android: Robotium)
*On iOS it uses
-cal scheme
Cucumber test reporter
REST API
Calabash Queries
You can use calabash to query your UI
http://blog.lesspainful.com/2012/12/18/Android-Query/
http://roadtoautomation.blogspot.nl/2013/12/road-to-identifying-elements-using.html
https://github.com/calabash/calabash-ios/wiki/05-Query-syntax
query("all button")
query("all view marked:'something'")
Recording Touches
We haven’t exposed it yet
“for reasons”
https://github.com/calabash/calabash-ios/wiki/04-Touch-recording-and-playback
Only works for iOS < 7
There appears to be hope for iOS 7
http://stackoverflow.com/questions/18205130/calabash-how-to-record-touches-on-iphone
!
Calabash Android doesn’t implement it.
There is a Robotium Recorder however.
If you need touch recording today, just use Appcelerator Platform.
Recording Touches
$ calabash-ios console
!
Now use the command record_begin
!
> record_begin
=> ""
This begins recording touch events. Now in the simulator perform the touch events you
want to record. This should be a short sequence of events corresponding to a gesture
on a view. Then use record_end "mytouches", for example
!
> record_end "drag_one_up"
=> "drag_one_up_ios5_iphone.base64"
This saves the touch events under the name "mytouches". In the example, you see the
string "drag_one_up_ios5_iphone.base64". This is actually a file being saved in your
directory.
!
You can test that the recording does what it should by running
!
> playback "drag_one_up"
=> ["<UIView: 0x7dc70b0; frame = (-48.7356 26.2644; 417.471 417.471); ...
This will playback the events you just recorded at the same coordinates you recorded
them. If you're unhappy with the results just try again.
!
If you're happy, exit the console and move the generated file to the "features" folder.
Jenkins
The Configuration
cd ~/Desktop/ticonf2014testappdemo/alloytest # or actually pull from git.
titanium clean
titanium build --platform=iphone --test &
sleep 30
killall "iPhone Simulator"
export PATH=“/Users/andrewmcelroy/.rbenv/shims:/Users/andrewmcelroy/bin:/usr/local/bin:
/Users/andrewmcelroy/.rbenv/bin:/Users/andrewmcelroy/android/tools:/Users/andrewmcelroy/android/:
/Users/andrewmcelroy/android//tools:/Users/andrewmcelroy/android/platform-tools/:/usr/bin:/bin:
/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:"
!
echo | titanium calabash —platform=iphone
!
cd ~/Library/Application Support/iPhone Simulator/7.1/Applications/
AppGUID = $(find . -name "alloytest" | cut -d "/" -f 2)
!
cp "~/Library/Application Support/iPhone Simulator/7.1/Applications/$AppGUID/Documents/jenkins.xml" $WORKSPACE/jenkins.xml
Questions?
!
Thank You
Andrew McElroy
https://CodexLabs.com
github.com/CodexLabs@CodexLabs
Matt Apperson
@mattapperson
Special thanks to Matt for the Android implementation

Weitere ähnliche Inhalte

Was ist angesagt?

Cross-platform Native App ontwikkeling met Appcelerator
Cross-platform Native App ontwikkeling met AppceleratorCross-platform Native App ontwikkeling met Appcelerator
Cross-platform Native App ontwikkeling met AppceleratorFokke Zandbergen
 
Android Automotive
Android AutomotiveAndroid Automotive
Android AutomotiveOpersys inc.
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)danielputerman
 
從 Google i/o 2015 看下半年 mobile 應用發展趨勢
從 Google i/o 2015 看下半年 mobile 應用發展趨勢從 Google i/o 2015 看下半年 mobile 應用發展趨勢
從 Google i/o 2015 看下半年 mobile 應用發展趨勢Ascii Huang
 
Android Flash Development
Android Flash DevelopmentAndroid Flash Development
Android Flash DevelopmentStephen Chin
 
Titanium 最近の動向 (2016年)
Titanium 最近の動向 (2016年)Titanium 最近の動向 (2016年)
Titanium 最近の動向 (2016年)忠利 花崎
 
Developing Android Apps
Developing Android AppsDeveloping Android Apps
Developing Android AppsClaire Lee
 
Automating the Gaps of Unit Testing Mobile Apps
Automating the Gaps of Unit Testing Mobile AppsAutomating the Gaps of Unit Testing Mobile Apps
Automating the Gaps of Unit Testing Mobile AppsGeoffrey Goetz
 
しごとで使うTitanium 第2版
しごとで使うTitanium 第2版しごとで使うTitanium 第2版
しごとで使うTitanium 第2版忠利 花崎
 
20150423 Android Taipei : 祖克伯F8的奇幻之旅
20150423 Android Taipei : 祖克伯F8的奇幻之旅20150423 Android Taipei : 祖克伯F8的奇幻之旅
20150423 Android Taipei : 祖克伯F8的奇幻之旅PRADA Hsiung
 
Android Flash Development
Android Flash DevelopmentAndroid Flash Development
Android Flash DevelopmentStephen Chin
 
Preparing for Release to the App Store
Preparing for Release to the App StorePreparing for Release to the App Store
Preparing for Release to the App StoreGeoffrey Goetz
 
Build mini - Windows 10 Dev & Cross platform Dev
Build mini - Windows 10 Dev & Cross platform DevBuild mini - Windows 10 Dev & Cross platform Dev
Build mini - Windows 10 Dev & Cross platform DevIan Chen
 
Building Native Mobile Apps using Javascript with Titanium
Building Native Mobile Apps using Javascript with TitaniumBuilding Native Mobile Apps using Javascript with Titanium
Building Native Mobile Apps using Javascript with TitaniumFokke Zandbergen
 
Intro to iPhone Development with MonoTouch
Intro to iPhone Development with MonoTouchIntro to iPhone Development with MonoTouch
Intro to iPhone Development with MonoTouchMichael Koby
 
iOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsiOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsShashikant Jagtap
 
Yahoo! 釀的酒 - 淺嚐 Cocktails
Yahoo! 釀的酒 - 淺嚐 CocktailsYahoo! 釀的酒 - 淺嚐 Cocktails
Yahoo! 釀的酒 - 淺嚐 CocktailsYing-Hsiang Liao
 

Was ist angesagt? (20)

Cross-platform Native App ontwikkeling met Appcelerator
Cross-platform Native App ontwikkeling met AppceleratorCross-platform Native App ontwikkeling met Appcelerator
Cross-platform Native App ontwikkeling met Appcelerator
 
Android Automotive
Android AutomotiveAndroid Automotive
Android Automotive
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)
 
Appcelerator Alloy MVC
Appcelerator Alloy MVCAppcelerator Alloy MVC
Appcelerator Alloy MVC
 
從 Google i/o 2015 看下半年 mobile 應用發展趨勢
從 Google i/o 2015 看下半年 mobile 應用發展趨勢從 Google i/o 2015 看下半年 mobile 應用發展趨勢
從 Google i/o 2015 看下半年 mobile 應用發展趨勢
 
Android Flash Development
Android Flash DevelopmentAndroid Flash Development
Android Flash Development
 
Titanium 最近の動向 (2016年)
Titanium 最近の動向 (2016年)Titanium 最近の動向 (2016年)
Titanium 最近の動向 (2016年)
 
Windows 8 Developer Preview
Windows 8 Developer PreviewWindows 8 Developer Preview
Windows 8 Developer Preview
 
Developing Android Apps
Developing Android AppsDeveloping Android Apps
Developing Android Apps
 
Automating the Gaps of Unit Testing Mobile Apps
Automating the Gaps of Unit Testing Mobile AppsAutomating the Gaps of Unit Testing Mobile Apps
Automating the Gaps of Unit Testing Mobile Apps
 
しごとで使うTitanium 第2版
しごとで使うTitanium 第2版しごとで使うTitanium 第2版
しごとで使うTitanium 第2版
 
20150423 Android Taipei : 祖克伯F8的奇幻之旅
20150423 Android Taipei : 祖克伯F8的奇幻之旅20150423 Android Taipei : 祖克伯F8的奇幻之旅
20150423 Android Taipei : 祖克伯F8的奇幻之旅
 
Android Flash Development
Android Flash DevelopmentAndroid Flash Development
Android Flash Development
 
Preparing for Release to the App Store
Preparing for Release to the App StorePreparing for Release to the App Store
Preparing for Release to the App Store
 
Build mini - Windows 10 Dev & Cross platform Dev
Build mini - Windows 10 Dev & Cross platform DevBuild mini - Windows 10 Dev & Cross platform Dev
Build mini - Windows 10 Dev & Cross platform Dev
 
Building Native Mobile Apps using Javascript with Titanium
Building Native Mobile Apps using Javascript with TitaniumBuilding Native Mobile Apps using Javascript with Titanium
Building Native Mobile Apps using Javascript with Titanium
 
Intro to iPhone Development with MonoTouch
Intro to iPhone Development with MonoTouchIntro to iPhone Development with MonoTouch
Intro to iPhone Development with MonoTouch
 
REST API Development (FB Live) - Episode 04
REST API Development (FB Live) - Episode 04REST API Development (FB Live) - Episode 04
REST API Development (FB Live) - Episode 04
 
iOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsiOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and Saucelabs
 
Yahoo! 釀的酒 - 淺嚐 Cocktails
Yahoo! 釀的酒 - 淺嚐 CocktailsYahoo! 釀的酒 - 淺嚐 Cocktails
Yahoo! 釀的酒 - 淺嚐 Cocktails
 

Ähnlich wie TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014

iPhone App from concept to product
iPhone App from concept to productiPhone App from concept to product
iPhone App from concept to productjoeysim
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhoneErin Dees
 
Debugging Tips and Tricks - iOS Conf Singapore 2015
Debugging Tips and Tricks - iOS Conf Singapore 2015Debugging Tips and Tricks - iOS Conf Singapore 2015
Debugging Tips and Tricks - iOS Conf Singapore 2015Fahim Farook
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do ThatNathan Smith
 
Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15sullis
 
Tips and Tricks for Mobile Flash Development
Tips and Tricks for Mobile Flash DevelopmentTips and Tricks for Mobile Flash Development
Tips and Tricks for Mobile Flash Developmentpaultrani
 
Mobile html5 today
Mobile html5 todayMobile html5 today
Mobile html5 todayIdo Green
 
Android - Open Source Bridge 2011
Android - Open Source Bridge 2011Android - Open Source Bridge 2011
Android - Open Source Bridge 2011sullis
 
Construir Aplicações Silverlight para Windows Phone 7
Construir Aplicações Silverlight para Windows Phone 7Construir Aplicações Silverlight para Windows Phone 7
Construir Aplicações Silverlight para Windows Phone 7Comunidade NetPonto
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011sullis
 
Use Web Skills To Build Mobile Apps
Use Web Skills To Build Mobile AppsUse Web Skills To Build Mobile Apps
Use Web Skills To Build Mobile AppsNathan Smith
 
Beginning Android Flash Development
Beginning Android Flash DevelopmentBeginning Android Flash Development
Beginning Android Flash DevelopmentStephen Chin
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & DebuggingIvano Malavolta
 
Videogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha TouchVideogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha TouchAlexander Wilhelm
 
Next Generation Apps with Google Chrome-By Dhruv Gohil
Next Generation Apps with Google Chrome-By Dhruv GohilNext Generation Apps with Google Chrome-By Dhruv Gohil
Next Generation Apps with Google Chrome-By Dhruv GohilHardik Upadhyay
 
Google Chrome DevTools features overview
Google Chrome DevTools features overviewGoogle Chrome DevTools features overview
Google Chrome DevTools features overviewOleksii Prohonnyi
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopmentgillygize
 
Live Source - an Agile Toolkit
Live Source - an Agile ToolkitLive Source - an Agile Toolkit
Live Source - an Agile ToolkitAlline Oliveira
 

Ähnlich wie TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014 (20)

iPhone App from concept to product
iPhone App from concept to productiPhone App from concept to product
iPhone App from concept to product
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhone
 
Debugging Tips and Tricks - iOS Conf Singapore 2015
Debugging Tips and Tricks - iOS Conf Singapore 2015Debugging Tips and Tricks - iOS Conf Singapore 2015
Debugging Tips and Tricks - iOS Conf Singapore 2015
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do That
 
Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15
 
Tips and Tricks for Mobile Flash Development
Tips and Tricks for Mobile Flash DevelopmentTips and Tricks for Mobile Flash Development
Tips and Tricks for Mobile Flash Development
 
Mobile html5 today
Mobile html5 todayMobile html5 today
Mobile html5 today
 
Android - Open Source Bridge 2011
Android - Open Source Bridge 2011Android - Open Source Bridge 2011
Android - Open Source Bridge 2011
 
Hacking Android OS
Hacking Android OSHacking Android OS
Hacking Android OS
 
It Works On Dev
It Works On DevIt Works On Dev
It Works On Dev
 
Construir Aplicações Silverlight para Windows Phone 7
Construir Aplicações Silverlight para Windows Phone 7Construir Aplicações Silverlight para Windows Phone 7
Construir Aplicações Silverlight para Windows Phone 7
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
 
Use Web Skills To Build Mobile Apps
Use Web Skills To Build Mobile AppsUse Web Skills To Build Mobile Apps
Use Web Skills To Build Mobile Apps
 
Beginning Android Flash Development
Beginning Android Flash DevelopmentBeginning Android Flash Development
Beginning Android Flash Development
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
 
Videogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha TouchVideogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha Touch
 
Next Generation Apps with Google Chrome-By Dhruv Gohil
Next Generation Apps with Google Chrome-By Dhruv GohilNext Generation Apps with Google Chrome-By Dhruv Gohil
Next Generation Apps with Google Chrome-By Dhruv Gohil
 
Google Chrome DevTools features overview
Google Chrome DevTools features overviewGoogle Chrome DevTools features overview
Google Chrome DevTools features overview
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopment
 
Live Source - an Agile Toolkit
Live Source - an Agile ToolkitLive Source - an Agile Toolkit
Live Source - an Agile Toolkit
 

Kürzlich hochgeladen

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Kürzlich hochgeladen (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014

  • 1. Ti Calabash: TiCalabash for Titanium: Fully Automated Testing. !
  • 3. Game Development with Titanium https://github.com/gouldjw/tiConf-Mobile-Dev-Wars-Demo https://vimeo.com/96590732 https://www.slideshare.net/gouldjw13/ticonf2014-gdtph-10may14ext http://www.avatar-soft.com/#tiConf2014
  • 6. Acceptance Testing Test the entire App from the UI down rather than Units (aka Unit Testing) Unit Testing + Acceptance Testing === Outside-in BDD <sidenote> http://www.sarahmei.com/blog/2010/05/29/outside-in-bdd/ credit: http://lostechies.com </sidenote>
  • 7. Before Acceptance Testing Some Pain Points Many devices, OS versions, Languages, Form Factors, Screen Density/Size… Time consuming process of manually clicking through screens. Catch and stop regressions
  • 8. The Original Vision A Natural Language Like DSL Extensible via ‘step definitions’ Supports Continuous Integration No Titanium Modules No touching tiapp.xml Use only a Titanium CLI hook No Ruby Dependencies
  • 9. Calabash Overview “Calabash supports Cucumber. Cucumber lets us express the behavior of our app using natural language that can be understood by business experts and non- technical QA staff.” — Calaba.sh “…Calabash is cross-platform, supporting Android and iOS native apps…”
  • 10. About that no Ruby thing… TiCucumber was too much work for too little reward. Matt Apperson had a better idea
  • 11. TiCalabash A Titanium CLI hook for Calabash Calabash is Cucumber for Mobile npm install -g ticalabash https://github.com/appersonlabs/ticalabash
  • 12. A Feature This is executable code: https://github.com/CodexLabs/alloy_fugitive/blob/master/features/fugitive.feature
  • 14. Custom Step Definitions Add your own steps:
  • 15. Demo
  • 16. Architecture of Calabash FYI (for the curious) features Cucumber (On Dev computer) iOS/ Android App Calabash library (contains a web server iOS: Frank Android: Robotium) *On iOS it uses -cal scheme Cucumber test reporter REST API
  • 17. Calabash Queries You can use calabash to query your UI http://blog.lesspainful.com/2012/12/18/Android-Query/ http://roadtoautomation.blogspot.nl/2013/12/road-to-identifying-elements-using.html https://github.com/calabash/calabash-ios/wiki/05-Query-syntax query("all button") query("all view marked:'something'")
  • 18. Recording Touches We haven’t exposed it yet “for reasons” https://github.com/calabash/calabash-ios/wiki/04-Touch-recording-and-playback Only works for iOS < 7 There appears to be hope for iOS 7 http://stackoverflow.com/questions/18205130/calabash-how-to-record-touches-on-iphone ! Calabash Android doesn’t implement it. There is a Robotium Recorder however. If you need touch recording today, just use Appcelerator Platform.
  • 19. Recording Touches $ calabash-ios console ! Now use the command record_begin ! > record_begin => "" This begins recording touch events. Now in the simulator perform the touch events you want to record. This should be a short sequence of events corresponding to a gesture on a view. Then use record_end "mytouches", for example ! > record_end "drag_one_up" => "drag_one_up_ios5_iphone.base64" This saves the touch events under the name "mytouches". In the example, you see the string "drag_one_up_ios5_iphone.base64". This is actually a file being saved in your directory. ! You can test that the recording does what it should by running ! > playback "drag_one_up" => ["<UIView: 0x7dc70b0; frame = (-48.7356 26.2644; 417.471 417.471); ... This will playback the events you just recorded at the same coordinates you recorded them. If you're unhappy with the results just try again. ! If you're happy, exit the console and move the generated file to the "features" folder.
  • 20. Jenkins The Configuration cd ~/Desktop/ticonf2014testappdemo/alloytest # or actually pull from git. titanium clean titanium build --platform=iphone --test & sleep 30 killall "iPhone Simulator" export PATH=“/Users/andrewmcelroy/.rbenv/shims:/Users/andrewmcelroy/bin:/usr/local/bin: /Users/andrewmcelroy/.rbenv/bin:/Users/andrewmcelroy/android/tools:/Users/andrewmcelroy/android/: /Users/andrewmcelroy/android//tools:/Users/andrewmcelroy/android/platform-tools/:/usr/bin:/bin: /usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:" ! echo | titanium calabash —platform=iphone ! cd ~/Library/Application Support/iPhone Simulator/7.1/Applications/ AppGUID = $(find . -name "alloytest" | cut -d "/" -f 2) ! cp "~/Library/Application Support/iPhone Simulator/7.1/Applications/$AppGUID/Documents/jenkins.xml" $WORKSPACE/jenkins.xml
  • 22. Thank You Andrew McElroy https://CodexLabs.com github.com/CodexLabs@CodexLabs Matt Apperson @mattapperson Special thanks to Matt for the Android implementation