SlideShare a Scribd company logo
1 of 28
Xamarin UI Test
And
Xamarin Test Cloud
Gavin Bryan
(Freelance Certified Xamarin Developer)
Overview
• Xamarin UI Test
• How and where Xamarin UI Tests can be run
• Xamarin Test Cloud
What is Xamarin UI Test?
• Automation Test Library
• Automate mobile device and application
• Automated UI Acceptance Tests written in
nunit (2.6.x) to be run against iOS and Android
• Can be used on Xamarin Apps, iOS (objective-c
/ Swift Apps) and Native Android Apps
• XTC does not support WP or Xamarin Forms
WP
Creating a Xamarin.UITest Project
Xamarin Studio has 3 Project Templates
1. MultiPlatform
Creating a Xamarin.UITest Project
2. IOS Template
Creating a Xamarin.UITest Project
3. Android Template
Most Simple Test
• [Test]
• public void MyFirstUITest()
• {
• var app = ConfigureApp
• .Android
• .ApkFile("MyApkFile.apk")
• .StartApp();
•
• app.EnterText("NameField", ”John Smith");
• app.Tap("SubmitButton");
• }
UITest Anatomy
• Uses a client / server communication using
http and json.
• Http server runs on the device
• Communicates with UI Test Client Agent
Android
• Xamarin Test Cloud Agent Server runs in it’s
own separate process
• Process is signed with the same keystore as
your application so it can drive it with the
Android Automation APIs
iOS
• Due to iOS restrictions on iOS the Xamarin
Test Cloud Agent has to be shipped with your
app in the bundle
• This allows it to access the iOS automation
APIs
• Xamarin Test Cloud Agent nuget needs to be
installed
Quick Example
app.Tap (c => c.Marked (”New"));
app.EnterText(c => c.Class("UITextField")
.Index(0), ”John Smith");
app.Tap (c => c.Marked ("Save"));
nUnit
• Test Fixture
• 3 A’s (Arrange / Act / Assert)
• Categories
• Demo – Create Android / IOS Project
UI Test Workflow
• Write automation tests while developing
feature
• Write tests, run locally to validate functionality
• Create Test run to run in CI / XTC etc.
UI Test Infrastructure
• Tests rely heavily on queries to locate UI
elements
• Different techniques to share test logic
between platforms
• Your tests can be cross-platform if you write
them in similar manner to cross-platform
apps.
Setting UI Elements
• Need a way for UI Test to identify UI Elements
• UI Test use different UI element ID on Android
and iOS
• Can you just text to identify element, but not
a good practice.
Android IDs
• Generally your normal android:id tag is best
identifier.
• e.g. android:id="@+id/submitButton"
• This is then used by UI Test
• app.Tap (x => x.Id ("submitButton"))
iOS Element IDs
• UI Element Accessibility Identifier
• UI Element Accessibility Label
• Can set in XCode Identity Inspector or in Code
Identifying UI Elements
• REPL (read, eval, print, loop)
• Android - Dump View Hierarchy for UI
Automator
• DEMO 1
UI Test Basics
• IApp – different implementations on Android
and iOS
• Use ConfigApp fluent builder to create
implementation on each platform
• Lots of methods and properties
Xamarin Test Recorder
• A tool for recording automated user interface
tests.
• Can be used on Android and iOS
• Android runs as standalone app
• iOS embeds a plugin into your app bundle to
run (make this is removed on app submission)
• Demo 2
Where Can You Run Your Tests
• Locally (devices or emulators / simulators)
• CI environments (TeamCity, VSTS, VSMC,
Jenkins, Bitrise etc.)
• Xamarin Test Cloud (XTC)
Command Line
• Run locally :-
nunit-console.exe in nuget package Nunit.Runners (2.6.4)
• Send to Test Cloud :-
• test-cloud.exe
Find Device Ids
• Android :- adb devices
• iOS - xcrun instruments -s devices (ios get local
devices) or Xcode
• Demo 3
Xamarin Test Cloud
• Test your app on hundreds of actual devices in
the Cloud (2000)
• Select Subset of devices to test on
• Very detailed analysis of your app
• Upload APK, IPA with UI Test Project
• iOS IPA are re-signed by Xamarin using their
own provisioning profiles
XTC
• Xamarin resigns your iOS app with their
provisioning profile so they can run on their
devices.
Some XTC Analysis
• Screenshots
• Memory Usage Profiling
• CPU Usage
• Test logs
• Device logs
• Demo 4
Thank You
• Any Questions ?

More Related Content

What's hot

Mvvm is like born fraction
Mvvm is like born fractionMvvm is like born fraction
Mvvm is like born fractionKen Haneda
 
Contributing to open source
Contributing to open sourceContributing to open source
Contributing to open sourceDevin Abbott
 
React UI Development: Introduction to "UI Component as API"
React UI Development: Introduction to "UI Component as API"React UI Development: Introduction to "UI Component as API"
React UI Development: Introduction to "UI Component as API"Itaru Kitagawa
 
Xamarin forms introduction by Taswar Bhatti and Ahmed Assad
Xamarin forms introduction by Taswar Bhatti and Ahmed AssadXamarin forms introduction by Taswar Bhatti and Ahmed Assad
Xamarin forms introduction by Taswar Bhatti and Ahmed AssadTaswar Bhatti
 
Test Inside Containers: Dockerise Appium Tests
Test Inside Containers: Dockerise Appium TestsTest Inside Containers: Dockerise Appium Tests
Test Inside Containers: Dockerise Appium TestsSrinivasan Sekar
 
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...Codemotion
 
An Introduction to ReactNative
An Introduction to ReactNativeAn Introduction to ReactNative
An Introduction to ReactNativeMichał Taberski
 
Introduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / GraphsIntroduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / GraphsRahat Khanna a.k.a mAppMechanic
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Nativedvcrn
 
Experiences building apps with React Native @UtrechtJS May 2016
Experiences building apps with React Native @UtrechtJS May 2016Experiences building apps with React Native @UtrechtJS May 2016
Experiences building apps with React Native @UtrechtJS May 2016Adrian Philipp
 
I Love APIs - Oct 2015
I Love APIs - Oct 2015I Love APIs - Oct 2015
I Love APIs - Oct 2015Mike McNeil
 
ng-conf NativeScript and Angular 2 Workshop
ng-conf NativeScript and Angular 2 Workshopng-conf NativeScript and Angular 2 Workshop
ng-conf NativeScript and Angular 2 Workshoptjvantoll
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appiumPratik Patel
 
Cross platform development
Cross platform developmentCross platform development
Cross platform developmentEvolve
 
Xamarin for (not only) Android developers
Xamarin for (not only) Android developersXamarin for (not only) Android developers
Xamarin for (not only) Android developersAleksander Piotrowski
 
Introduction to Android with C# using Xamarin
Introduction to Android with C# using XamarinIntroduction to Android with C# using Xamarin
Introduction to Android with C# using XamarinCraig Dunn
 
Flex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application DevelopmentFlex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application DevelopmentTalentica Software
 
Creating iOS and Android Apps with Visual Studio and C#
Creating iOS and Android Apps with Visual Studio and C# Creating iOS and Android Apps with Visual Studio and C#
Creating iOS and Android Apps with Visual Studio and C# mobiweave
 

What's hot (20)

Mvvm is like born fraction
Mvvm is like born fractionMvvm is like born fraction
Mvvm is like born fraction
 
Titanium @ Minnebar
Titanium @ MinnebarTitanium @ Minnebar
Titanium @ Minnebar
 
Contributing to open source
Contributing to open sourceContributing to open source
Contributing to open source
 
React UI Development: Introduction to "UI Component as API"
React UI Development: Introduction to "UI Component as API"React UI Development: Introduction to "UI Component as API"
React UI Development: Introduction to "UI Component as API"
 
Xamarin forms introduction by Taswar Bhatti and Ahmed Assad
Xamarin forms introduction by Taswar Bhatti and Ahmed AssadXamarin forms introduction by Taswar Bhatti and Ahmed Assad
Xamarin forms introduction by Taswar Bhatti and Ahmed Assad
 
Test Inside Containers: Dockerise Appium Tests
Test Inside Containers: Dockerise Appium TestsTest Inside Containers: Dockerise Appium Tests
Test Inside Containers: Dockerise Appium Tests
 
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
 
An Introduction to ReactNative
An Introduction to ReactNativeAn Introduction to ReactNative
An Introduction to ReactNative
 
Introduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / GraphsIntroduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / Graphs
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Experiences building apps with React Native @UtrechtJS May 2016
Experiences building apps with React Native @UtrechtJS May 2016Experiences building apps with React Native @UtrechtJS May 2016
Experiences building apps with React Native @UtrechtJS May 2016
 
I Love APIs - Oct 2015
I Love APIs - Oct 2015I Love APIs - Oct 2015
I Love APIs - Oct 2015
 
Automated UI Testing Frameworks
Automated UI Testing FrameworksAutomated UI Testing Frameworks
Automated UI Testing Frameworks
 
ng-conf NativeScript and Angular 2 Workshop
ng-conf NativeScript and Angular 2 Workshopng-conf NativeScript and Angular 2 Workshop
ng-conf NativeScript and Angular 2 Workshop
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
 
Cross platform development
Cross platform developmentCross platform development
Cross platform development
 
Xamarin for (not only) Android developers
Xamarin for (not only) Android developersXamarin for (not only) Android developers
Xamarin for (not only) Android developers
 
Introduction to Android with C# using Xamarin
Introduction to Android with C# using XamarinIntroduction to Android with C# using Xamarin
Introduction to Android with C# using Xamarin
 
Flex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application DevelopmentFlex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application Development
 
Creating iOS and Android Apps with Visual Studio and C#
Creating iOS and Android Apps with Visual Studio and C# Creating iOS and Android Apps with Visual Studio and C#
Creating iOS and Android Apps with Visual Studio and C#
 

Viewers also liked

Building android apps using xamarin
Building android apps using xamarinBuilding android apps using xamarin
Building android apps using xamarinNitesh Luharuka
 
Xamarin mobile app portfolio tecordeon2
Xamarin mobile app portfolio   tecordeon2Xamarin mobile app portfolio   tecordeon2
Xamarin mobile app portfolio tecordeon2Ravi Chandra
 
SEMINAR ON Bluetooth Hotspot
SEMINAR ON Bluetooth HotspotSEMINAR ON Bluetooth Hotspot
SEMINAR ON Bluetooth HotspotKamonasish Hore
 
Rotating magnetic field
Rotating magnetic fieldRotating magnetic field
Rotating magnetic fieldASHISH RAJ
 
Dave hay web sphere administration for domino administrators
Dave hay   web sphere administration for domino administratorsDave hay   web sphere administration for domino administrators
Dave hay web sphere administration for domino administratorsDave Hay
 
Net India123 Sept 22, 2008 - Markets fall sharply but begin recovery mid-afte...
Net India123 Sept 22, 2008 - Markets fall sharply but begin recovery mid-afte...Net India123 Sept 22, 2008 - Markets fall sharply but begin recovery mid-afte...
Net India123 Sept 22, 2008 - Markets fall sharply but begin recovery mid-afte...Jagannadham Thunuguntla
 
Xamarin Navigation Patterns
Xamarin Navigation PatternsXamarin Navigation Patterns
Xamarin Navigation Patternsdanhermes
 
Visual Studio Toolbox - Introduction To Xamarin.Forms
Visual Studio Toolbox - Introduction To Xamarin.FormsVisual Studio Toolbox - Introduction To Xamarin.Forms
Visual Studio Toolbox - Introduction To Xamarin.FormsJames Montemagno
 
Examples of smart_objective_attributes
Examples of smart_objective_attributesExamples of smart_objective_attributes
Examples of smart_objective_attributeshenry KKK
 
Introduction to cross platform natitve mobile development with c# and xamarin
Introduction to cross platform natitve mobile development with c# and xamarinIntroduction to cross platform natitve mobile development with c# and xamarin
Introduction to cross platform natitve mobile development with c# and xamarinJames Montemagno
 
Xamarin.Android + Arduino : Hacking Robots
Xamarin.Android + Arduino : Hacking RobotsXamarin.Android + Arduino : Hacking Robots
Xamarin.Android + Arduino : Hacking RobotsAlejandro Ruiz Varela
 
Resume objective example
Resume objective exampleResume objective example
Resume objective examplesanthose menon
 
Extreme (Salesforce) Resume Makeover!
Extreme (Salesforce) Resume Makeover!Extreme (Salesforce) Resume Makeover!
Extreme (Salesforce) Resume Makeover!Brett Barlow ☁
 
Recruitment Management Systems
Recruitment Management SystemsRecruitment Management Systems
Recruitment Management SystemsMariaVyalkova
 
Mobile Banking Apps with Xamarin
Mobile Banking Apps with XamarinMobile Banking Apps with Xamarin
Mobile Banking Apps with XamarinXpand IT
 
Building Your First Android App with Xamarin
Building Your First Android App with XamarinBuilding Your First Android App with Xamarin
Building Your First Android App with XamarinXamarin
 
Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#
Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#
Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#Xamarin
 

Viewers also liked (20)

Building android apps using xamarin
Building android apps using xamarinBuilding android apps using xamarin
Building android apps using xamarin
 
Xamarin mobile app portfolio tecordeon2
Xamarin mobile app portfolio   tecordeon2Xamarin mobile app portfolio   tecordeon2
Xamarin mobile app portfolio tecordeon2
 
SEMINAR ON Bluetooth Hotspot
SEMINAR ON Bluetooth HotspotSEMINAR ON Bluetooth Hotspot
SEMINAR ON Bluetooth Hotspot
 
Rotating magnetic field
Rotating magnetic fieldRotating magnetic field
Rotating magnetic field
 
Dave hay web sphere administration for domino administrators
Dave hay   web sphere administration for domino administratorsDave hay   web sphere administration for domino administrators
Dave hay web sphere administration for domino administrators
 
CV_Sbrodov Stanislav
CV_Sbrodov StanislavCV_Sbrodov Stanislav
CV_Sbrodov Stanislav
 
Net India123 Sept 22, 2008 - Markets fall sharply but begin recovery mid-afte...
Net India123 Sept 22, 2008 - Markets fall sharply but begin recovery mid-afte...Net India123 Sept 22, 2008 - Markets fall sharply but begin recovery mid-afte...
Net India123 Sept 22, 2008 - Markets fall sharply but begin recovery mid-afte...
 
Xamarin Navigation Patterns
Xamarin Navigation PatternsXamarin Navigation Patterns
Xamarin Navigation Patterns
 
Visual Studio Toolbox - Introduction To Xamarin.Forms
Visual Studio Toolbox - Introduction To Xamarin.FormsVisual Studio Toolbox - Introduction To Xamarin.Forms
Visual Studio Toolbox - Introduction To Xamarin.Forms
 
Examples of smart_objective_attributes
Examples of smart_objective_attributesExamples of smart_objective_attributes
Examples of smart_objective_attributes
 
Introduction to cross platform natitve mobile development with c# and xamarin
Introduction to cross platform natitve mobile development with c# and xamarinIntroduction to cross platform natitve mobile development with c# and xamarin
Introduction to cross platform natitve mobile development with c# and xamarin
 
Xamarin.Android + Arduino : Hacking Robots
Xamarin.Android + Arduino : Hacking RobotsXamarin.Android + Arduino : Hacking Robots
Xamarin.Android + Arduino : Hacking Robots
 
Resume objective example
Resume objective exampleResume objective example
Resume objective example
 
Lecture 08 Xamarin
Lecture 08 XamarinLecture 08 Xamarin
Lecture 08 Xamarin
 
Rajesh unni krishna resume
Rajesh unni krishna resumeRajesh unni krishna resume
Rajesh unni krishna resume
 
Extreme (Salesforce) Resume Makeover!
Extreme (Salesforce) Resume Makeover!Extreme (Salesforce) Resume Makeover!
Extreme (Salesforce) Resume Makeover!
 
Recruitment Management Systems
Recruitment Management SystemsRecruitment Management Systems
Recruitment Management Systems
 
Mobile Banking Apps with Xamarin
Mobile Banking Apps with XamarinMobile Banking Apps with Xamarin
Mobile Banking Apps with Xamarin
 
Building Your First Android App with Xamarin
Building Your First Android App with XamarinBuilding Your First Android App with Xamarin
Building Your First Android App with Xamarin
 
Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#
Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#
Intro to Xamarin for Visual Studio: Native iOS, Android, and Windows Apps in C#
 

Similar to Xamarin UI Test And Xamarin Test Cloud

Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingBitbar
 
Automation using Javascript
Automation using JavascriptAutomation using Javascript
Automation using Javascriptkhanhdang1214
 
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...İbrahim KIVANÇ
 
Mobile testing. Xamarin.UITest approach
Mobile testing. Xamarin.UITest approachMobile testing. Xamarin.UITest approach
Mobile testing. Xamarin.UITest approachVolodymyr Kimak
 
XCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with XcodeXCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with XcodepCloudy
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building AndroidDroidcon Berlin
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648Eing Ong
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversingEnrique López Mañas
 
Introduction to Xamarin
Introduction to XamarinIntroduction to Xamarin
Introduction to XamarinGuy Barrette
 
Visual Studio 2017 Launch Event
Visual Studio 2017 Launch EventVisual Studio 2017 Launch Event
Visual Studio 2017 Launch EventJames Montemagno
 
Mobile Testing Challenges Lighting Talk with www.softtest.ie
Mobile Testing Challenges Lighting Talk with www.softtest.ieMobile Testing Challenges Lighting Talk with www.softtest.ie
Mobile Testing Challenges Lighting Talk with www.softtest.ieDavid O'Dowd
 
PUG Challenge 2016 - The nativescript pug app challenge
PUG Challenge 2016 -  The nativescript pug app challengePUG Challenge 2016 -  The nativescript pug app challenge
PUG Challenge 2016 - The nativescript pug app challengeBronco Oostermeyer
 
Selenium in the palm of your hand: Appium and automated mobile testing
Selenium in the palm of your hand: Appium and automated mobile testingSelenium in the palm of your hand: Appium and automated mobile testing
Selenium in the palm of your hand: Appium and automated mobile testingIsaac Murchie
 
Xamarin.UITest. From "Zero" to "Hero"
Xamarin.UITest. From "Zero" to "Hero"Xamarin.UITest. From "Zero" to "Hero"
Xamarin.UITest. From "Zero" to "Hero"Volodymyr Kimak
 
Appium Overview - by Daniel Puterman
Appium Overview - by Daniel PutermanAppium Overview - by Daniel Puterman
Appium Overview - by Daniel PutermanApplitools
 
Android 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndroid 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndy Scherzinger
 
Automating Mobile Applications
Automating Mobile ApplicationsAutomating Mobile Applications
Automating Mobile ApplicationsApril Luk
 
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...Amazon Web Services
 
Xamarin Platform
Xamarin PlatformXamarin Platform
Xamarin PlatformRui Marinho
 

Similar to Xamarin UI Test And Xamarin Test Cloud (20)

Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App Testing
 
Automation using Javascript
Automation using JavascriptAutomation using Javascript
Automation using Javascript
 
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
 
Mobile testing. Xamarin.UITest approach
Mobile testing. Xamarin.UITest approachMobile testing. Xamarin.UITest approach
Mobile testing. Xamarin.UITest approach
 
XCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with XcodeXCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with Xcode
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversing
 
Introduction to Xamarin
Introduction to XamarinIntroduction to Xamarin
Introduction to Xamarin
 
Visual Studio 2017 Launch Event
Visual Studio 2017 Launch EventVisual Studio 2017 Launch Event
Visual Studio 2017 Launch Event
 
Mobile Testing Challenges Lighting Talk with www.softtest.ie
Mobile Testing Challenges Lighting Talk with www.softtest.ieMobile Testing Challenges Lighting Talk with www.softtest.ie
Mobile Testing Challenges Lighting Talk with www.softtest.ie
 
PUG Challenge 2016 - The nativescript pug app challenge
PUG Challenge 2016 -  The nativescript pug app challengePUG Challenge 2016 -  The nativescript pug app challenge
PUG Challenge 2016 - The nativescript pug app challenge
 
Xamarin v.Now
Xamarin v.NowXamarin v.Now
Xamarin v.Now
 
Selenium in the palm of your hand: Appium and automated mobile testing
Selenium in the palm of your hand: Appium and automated mobile testingSelenium in the palm of your hand: Appium and automated mobile testing
Selenium in the palm of your hand: Appium and automated mobile testing
 
Xamarin.UITest. From "Zero" to "Hero"
Xamarin.UITest. From "Zero" to "Hero"Xamarin.UITest. From "Zero" to "Hero"
Xamarin.UITest. From "Zero" to "Hero"
 
Appium Overview - by Daniel Puterman
Appium Overview - by Daniel PutermanAppium Overview - by Daniel Puterman
Appium Overview - by Daniel Puterman
 
Android 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndroid 101 - Introduction to Android Development
Android 101 - Introduction to Android Development
 
Automating Mobile Applications
Automating Mobile ApplicationsAutomating Mobile Applications
Automating Mobile Applications
 
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
 
Xamarin Platform
Xamarin PlatformXamarin Platform
Xamarin Platform
 

Recently uploaded

PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.KathleenAnnCordero2
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSebastiano Panichella
 
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.comSaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.comsaastr
 
Dutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular PlasticsDutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular PlasticsDutch Power
 
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...漢銘 謝
 
Work Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxWork Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxmavinoikein
 
Event 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptxEvent 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptxaryanv1753
 
Anne Frank A Beacon of Hope amidst darkness ppt.pptx
Anne Frank A Beacon of Hope amidst darkness ppt.pptxAnne Frank A Beacon of Hope amidst darkness ppt.pptx
Anne Frank A Beacon of Hope amidst darkness ppt.pptxnoorehahmad
 
SBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSebastiano Panichella
 
miladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptxmiladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptxCarrieButtitta
 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxFamilyWorshipCenterD
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@vikas rana
 
Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170Escort Service
 
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...marjmae69
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Krijn Poppe
 
Genshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptxGenshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptxJohnree4
 
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
PHYSICS PROJECT BY MSC - NANOTECHNOLOGY
PHYSICS PROJECT BY MSC  - NANOTECHNOLOGYPHYSICS PROJECT BY MSC  - NANOTECHNOLOGY
PHYSICS PROJECT BY MSC - NANOTECHNOLOGYpruthirajnayak525
 
Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸mathanramanathan2005
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringSebastiano Panichella
 

Recently uploaded (20)

PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
 
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.comSaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
 
Dutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular PlasticsDutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
 
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
 
Work Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxWork Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptx
 
Event 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptxEvent 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptx
 
Anne Frank A Beacon of Hope amidst darkness ppt.pptx
Anne Frank A Beacon of Hope amidst darkness ppt.pptxAnne Frank A Beacon of Hope amidst darkness ppt.pptx
Anne Frank A Beacon of Hope amidst darkness ppt.pptx
 
SBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation Track
 
miladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptxmiladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptx
 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@
 
Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170
 
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
 
Genshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptxGenshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptx
 
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
 
PHYSICS PROJECT BY MSC - NANOTECHNOLOGY
PHYSICS PROJECT BY MSC  - NANOTECHNOLOGYPHYSICS PROJECT BY MSC  - NANOTECHNOLOGY
PHYSICS PROJECT BY MSC - NANOTECHNOLOGY
 
Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software Engineering
 

Xamarin UI Test And Xamarin Test Cloud

  • 1. Xamarin UI Test And Xamarin Test Cloud Gavin Bryan (Freelance Certified Xamarin Developer)
  • 2. Overview • Xamarin UI Test • How and where Xamarin UI Tests can be run • Xamarin Test Cloud
  • 3. What is Xamarin UI Test? • Automation Test Library • Automate mobile device and application • Automated UI Acceptance Tests written in nunit (2.6.x) to be run against iOS and Android • Can be used on Xamarin Apps, iOS (objective-c / Swift Apps) and Native Android Apps • XTC does not support WP or Xamarin Forms WP
  • 4. Creating a Xamarin.UITest Project Xamarin Studio has 3 Project Templates 1. MultiPlatform
  • 5. Creating a Xamarin.UITest Project 2. IOS Template
  • 6. Creating a Xamarin.UITest Project 3. Android Template
  • 7. Most Simple Test • [Test] • public void MyFirstUITest() • { • var app = ConfigureApp • .Android • .ApkFile("MyApkFile.apk") • .StartApp(); • • app.EnterText("NameField", ”John Smith"); • app.Tap("SubmitButton"); • }
  • 8. UITest Anatomy • Uses a client / server communication using http and json. • Http server runs on the device • Communicates with UI Test Client Agent
  • 9.
  • 10. Android • Xamarin Test Cloud Agent Server runs in it’s own separate process • Process is signed with the same keystore as your application so it can drive it with the Android Automation APIs
  • 11. iOS • Due to iOS restrictions on iOS the Xamarin Test Cloud Agent has to be shipped with your app in the bundle • This allows it to access the iOS automation APIs • Xamarin Test Cloud Agent nuget needs to be installed
  • 12. Quick Example app.Tap (c => c.Marked (”New")); app.EnterText(c => c.Class("UITextField") .Index(0), ”John Smith"); app.Tap (c => c.Marked ("Save"));
  • 13. nUnit • Test Fixture • 3 A’s (Arrange / Act / Assert) • Categories • Demo – Create Android / IOS Project
  • 14. UI Test Workflow • Write automation tests while developing feature • Write tests, run locally to validate functionality • Create Test run to run in CI / XTC etc.
  • 15. UI Test Infrastructure • Tests rely heavily on queries to locate UI elements • Different techniques to share test logic between platforms • Your tests can be cross-platform if you write them in similar manner to cross-platform apps.
  • 16. Setting UI Elements • Need a way for UI Test to identify UI Elements • UI Test use different UI element ID on Android and iOS • Can you just text to identify element, but not a good practice.
  • 17. Android IDs • Generally your normal android:id tag is best identifier. • e.g. android:id="@+id/submitButton" • This is then used by UI Test • app.Tap (x => x.Id ("submitButton"))
  • 18. iOS Element IDs • UI Element Accessibility Identifier • UI Element Accessibility Label • Can set in XCode Identity Inspector or in Code
  • 19. Identifying UI Elements • REPL (read, eval, print, loop) • Android - Dump View Hierarchy for UI Automator • DEMO 1
  • 20. UI Test Basics • IApp – different implementations on Android and iOS • Use ConfigApp fluent builder to create implementation on each platform • Lots of methods and properties
  • 21. Xamarin Test Recorder • A tool for recording automated user interface tests. • Can be used on Android and iOS • Android runs as standalone app • iOS embeds a plugin into your app bundle to run (make this is removed on app submission) • Demo 2
  • 22. Where Can You Run Your Tests • Locally (devices or emulators / simulators) • CI environments (TeamCity, VSTS, VSMC, Jenkins, Bitrise etc.) • Xamarin Test Cloud (XTC)
  • 23. Command Line • Run locally :- nunit-console.exe in nuget package Nunit.Runners (2.6.4) • Send to Test Cloud :- • test-cloud.exe
  • 24. Find Device Ids • Android :- adb devices • iOS - xcrun instruments -s devices (ios get local devices) or Xcode • Demo 3
  • 25. Xamarin Test Cloud • Test your app on hundreds of actual devices in the Cloud (2000) • Select Subset of devices to test on • Very detailed analysis of your app • Upload APK, IPA with UI Test Project • iOS IPA are re-signed by Xamarin using their own provisioning profiles
  • 26. XTC • Xamarin resigns your iOS app with their provisioning profile so they can run on their devices.
  • 27. Some XTC Analysis • Screenshots • Memory Usage Profiling • CPU Usage • Test logs • Device logs • Demo 4
  • 28. Thank You • Any Questions ?

Editor's Notes

  1. Visual Studio has various project templates too
  2. Process is signed with the same keystore as your application so it can driver it with the Android Automation APIS
  3. https://developer.android.com/studio/profile/hierarchy-viewer.html
  4. https://developer.xamarin.com/api/namespace/Xamarin.UITest/
  5. https://testcloud.xamarin.com/devices