What's New and Cool in XTC?
Karl Krukow, Microsoft Engineering Manager, Xamarin Test Cloud @karlkrukow
Xamarin Dev Day, Singapore 2016
Secrets of Xamarin Test Cloud
Agenda
,
What is Xamarin Test Cloud? Top 5 Misconceptions New Stuff and Secret Stuff
Automated Testing on thousands of mobile devices
So how does it work?
So how does it REALLY work?
Create Tests and run them locally on simulator or device right from the IDE.
Xamarin.UITest (C#) / Calabash (Ruby)
Automatically execute tests in the cloud in parallel from a pool of real iOS & Android devices.
Xamarin Test Cloud
• Interact with UI controls in your app using gestures
• Declarative query language to identify views on screen
• Wait for events to occur (e.g., no spinner visible)
• Generate screenshots
• App-lifecycle APIs (start/stop, etc)
• Low-level APIs provides access to reflectively call methods on app objects
Automated UI Testing
//Example in C# using Xamarin.UITest app.Tap ("Help"); app.Tap (e => e.Id ("history-btn"));app.WaitForElement (e => e.Text ("Ink"));app.Screenshot ("View the purchasing history");
Tap Scroll Swipe Pinch Multi finger
Text Entry Rotation GPS
Xamarin Test Cloud
DEMO (I'm a link!)
Top 5 Common Misconceptions
That's nice, too bad my App isn't built with Xamarin.
Misconception #5
Xamarin Test Cloud works with every native and hybrid mobile app - it doesn't matter how it was built.
Xamarin / C# Xcode / Objective-C / Swift Android Studio / Java Cordova / JS React Native / JS ...
Test Cloud is WAAAY too expensive!
Misconception #4
Well, that's subjective :)
https://www.xamarin.com/test-cloud
Xamarin.UITest is completely free to use!
Wow! Cool! I'd love to use it! Too bad we don't have time
to write tests...
Misconception #3
We Understand!
"How can you afford not to test?" - Niels Frydenholm, eBay classified
If you think you don't have time, you're probably wrong ;) (I'm a link!)
Also: How hard it is to get started with Continuous Delivery on Mobile?
https://www.youtube.com/watch?v=wXgnh2Q7Uv8
https://vimeo.com/155029659
Continuous Delivery for Mobile Apps: Yes We Can!
Also watch this space for announcements this month :)
So these 'devices', they're emulators. ... Right?!?
Misconception #2
NO! They're real non-jailbroken devices!
I can build my own Test Labs! How hard can it be?
Misconception #1
So you want to build your own Test Cloud?
Stable WiFi
Automated parallel execution infrastructurePop-Ups (e.g., update)
Device Stability (Unplugging/replugging devices, transparent reruns, cleaning)
Test Data aggregation, Crash detection, screenshots, video,...
Device automation
Managing Macs
Managing and Procuring Devices
Device Maintenance
Provisioning Profiles Google Play Services
New Stuff & Secret Stuff
New and Secret stuff
Android Fast Clearing of AppData Android Video recording (use: --test-param screencapture:true)
New and Secret stuff
iOS: upload dSyms (without), UITest 2.0.0 / Calabash 0.20.0 / iOS10 / the Device Agent interface
New and Secret stuff
UITest
Hyper-parallel runs vs serial, CLI runs (see demo)) UITest 2.0
New and Secret stuff
New Frameworks: Appium, Espresso
• Cross-platform C#-based API
• Run with NUnit
• Xamarin/Visual Studio or CLI
• SpecFlow support
Xamarin.UITest• Write Tests in Ruby
• Supports BDD, run with Cucumber
• RubyMine or CLI
Calabash
• Write Tests using Selenium/Webdriver
• e.g. Java, (Python, JavaScript, ...)
• Leverage Selenium resources
Appium Espresso (XCUITest?)• Official tools
• Java/Obj-C/Swift
• Not cross platform
Thanks! Questions?
Happy to help people get set up with testing here today!
ReferencesLinks
■ Xamarin Test Cloud: http://xamarin.com/test-cloud
• Xamarin.UITest: http://developer.xamarin.com/guides/testcloud/uitest/
• Calabash Guides: http://developer.xamarin.com/guides/testcloud/calabash/
• Test Recorder: https://www.xamarin.com/test-cloud/recorder (preview)
• Samples
• https://github.com/xamarinhq/app-acquaint
• (Tests to be open sourced soon)
Karl Krukow, Microsoft Engineering Manager, Xamarin Test Cloud @karlkrukow [email protected]
Xamarin Dev Day, Singapore 2016
Top Related