SlideShare a Scribd company logo
Mobile testing.
Xamarin.UITest approach
About me
Volodymyr Kimak
Senior .NET Engineer, Softjourn
7+ years in .NET, 3+ years in Xamarin
Xamarin Certified Mobile Developer (until Feb 2018)
IF .NET User Group co-organiser
● Intro to mobile testing
● How to start?
● Xamarin Test Recorder
● Selectors, Queries, Tests
● Parallelism
● Integration with CI/CD
Agenda
Mobile automation
Why Xamarin.UITest?
Intro to Xamarin.UITest
Using Xamarin.UITest, you can
test:
● Native app
● Hybrid app
Xamarin.UITest - is a UI Acceptance Testing
framework which uses C# and NUnit test engine.
How to start?
Recording example in MacOS
Xamarin Test Recorder
● Tap
● Scroll
● Swipe
● Pinch
● EnterText
● ClearText
● Back
● Query
● WaitFor(No)Element
Commands
Queries
● Id
● Class
● Text
● Button
● Property
● Marked
● XPath
● Css
● etc...
Queries Usage example
Input element on the screen:
[AppCompatEditText]id:"userName"
Can be defined as:
● app.Query("userName");
● app.Query(x=>x.Id("userName"));
● app.Query(x=>x.TextField("userName"));
● app.Query(x=>x.Marked("userName"));
● app.Query(x=>x.Class("AppCompatEditText")
.Index(0));
app.WaitForElement(c=>c.Marked("OpenNewTab"));
app.Tap(c=>c.Marked("OpenNewTab"));
app.ClearText( c=> c.Id("noteInput"));
app.EnterText( c=> c.Id("noteInput"), "note");
app.ScrollDown();
app.ScrollDownTo(c => c.Id("menu"));
Commands Usage example
Android base configuration
IApp app = ConfigureApp
.Android
.ApkFile("/path/to/android.apk")
.StartApp();
App Initializing
iOS base configuration
IApp app = ConfigureApp
.iOS
.AppBundle("/path/to/iosapp.app")
.StartApp();
REPL (read-eval-print-loop)
Usage in test code:
app.Repl();
One test: 2 platforms basic example
ITodoPageElements _elements;
public TodoPage(IApp app, Platform platform): base(app, platform)
{
if (Platform == Platform.Android)
{
_elements = new DroidTodoPageElements();
}
else if (Platform == Platform.iOS)
{
_elements = new iOSTodoPageElements();
}
}
Simple test example
[Test]
public void CreateNewTodoItem()
{
new LoginScreen()
.LoginAsAppUser(UInfo.uname,UInfo.pass);
new TodoScreen()
.TapOnAddButton()
.AddTitle()
.ChooseDate()
.TapCreateButton()
.CheckIfItemIsCreated();
}
Test project structure
Before After
Approaches
Parallelism
▪ On-premises
- nUnit2 + CI
- nUnit3 (+ CI)
▪ Cloud based (Visual Studio App Center Test)
CI/CD Pipeline solutions
▪ TeamCity
▪ VSTS
▪ Visual Studio App Center
CI steps: mobile app (VSTS)
CI steps: UI tests (VSTS)
CD steps: run tests pipeline (VSTS)
CD steps: environment tasks (VSTS)
Test run result (Visual Studio App Center)
Test run result (Visual Studio App Center)
Advantages
● Frequent and stable releases to Production
● Performance simulation
● Reduces regression testing time and efforts
● Improves mobile application architecture and code quality
Disadvantages
● Xamarin.iOS app requires a special build (without a source
code change automation is not possible);
● Difference in platform capabilities;
● Application may not respond;
● Doesn’t support some hardware features;
● No integration with other apps installed on the device
Summary
● Choose a test automation tool based on the development toolset;
● Xamarin.UITest is easy to use;
● Don’t think about platform specifics, write tests;
● One test - two platforms, it works;
● Run your mobile tests in parallel using your own device farm or
test cloud;
● CI/CD integration - a must-have for a mobile project
Questions?
or ask later:
vova.kimak

More Related Content

What's hot (20)

PDF
Future of Mobile Automation, Appium Steals it
Srinivasan Sekar
 
PPTX
Mobile CI
Jerel Hass
 
PPTX
Cross Platform Mobile Technologies
Talentica Software
 
PPTX
Automated Build using teamcity
Md Jawed
 
PDF
Android UI Testing with Appium
Luke Maung
 
PDF
Continuous Integration for your Android projects
Sergii Zhuk
 
ODP
Ci for-android-apps
Anthony Dahanne
 
PPTX
Build Automation in Android
Angelo Rüggeberg
 
PDF
Lean Quality & Engineering
Mek Srunyu Stittri
 
PDF
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
Fwdays
 
PDF
Using TeamCity Inside JetBrains
Evgeniy Koshkin
 
PPTX
TDC2016SP - Cross-Platform Development with C#
tdc-globalcode
 
PDF
Eclipse Testing Day 2010. Xored Q7
platoff
 
PDF
'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020
OdessaJS Conf
 
PDF
Visual Automation Framework via Screenshot Comparison
Mek Srunyu Stittri
 
PPT
Eclipse RCP
Vijay Kiran
 
PPTX
Jumpstart application development
Linx
 
PPTX
Jumpstart application development
Linx
 
PDF
Continous UI testing with Espresso and Jenkins
Sylwester Madej
 
PPTX
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Bitbar
 
Future of Mobile Automation, Appium Steals it
Srinivasan Sekar
 
Mobile CI
Jerel Hass
 
Cross Platform Mobile Technologies
Talentica Software
 
Automated Build using teamcity
Md Jawed
 
Android UI Testing with Appium
Luke Maung
 
Continuous Integration for your Android projects
Sergii Zhuk
 
Ci for-android-apps
Anthony Dahanne
 
Build Automation in Android
Angelo Rüggeberg
 
Lean Quality & Engineering
Mek Srunyu Stittri
 
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
Fwdays
 
Using TeamCity Inside JetBrains
Evgeniy Koshkin
 
TDC2016SP - Cross-Platform Development with C#
tdc-globalcode
 
Eclipse Testing Day 2010. Xored Q7
platoff
 
'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020
OdessaJS Conf
 
Visual Automation Framework via Screenshot Comparison
Mek Srunyu Stittri
 
Eclipse RCP
Vijay Kiran
 
Jumpstart application development
Linx
 
Jumpstart application development
Linx
 
Continous UI testing with Espresso and Jenkins
Sylwester Madej
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Bitbar
 

Similar to Mobile testing. Xamarin.UITest approach (20)

PPTX
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
İbrahim KIVANÇ
 
PPTX
Xamarin UI Test And Xamarin Test Cloud
Emanuel Amiguinho
 
PPT
Mobile applications and automation testing
IndicThreads
 
PPTX
Continuous testing at scale
Gergely Orosz
 
PPTX
Getting Started with Coded UI Testing: Building Your First Automated Test
Imaginet
 
PPTX
Android Apps Testing in 2019
Ivan Katunou
 
PDF
Ibm rational mobile
Roberto Pozzi
 
PPTX
Benefits of using native automation tooling for mobile application testing.pptx
Mesut Günes
 
DOC
Priyanka_3.5years_Resume
Priyanka Banda
 
PPTX
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...
Riccardo Coppola
 
PDF
Velocity Conference: Increasing Speed To Market In Mobile Development Through...
Intuit Inc.
 
PDF
Fight back android fragmentation
Bitbar
 
PDF
Introduction To Mobile-Automation
Mindfire Solutions
 
PPT
Automation Testing on Selenium by Quontra Solutions
QUONTRASOLUTIONS
 
PPTX
Udvid din test portefølje med coded ui test og cloud load test
Peter Lindberg
 
PDF
Velocity2013 mobile ci_intuit
Tina Su
 
PDF
Velocity2013 mobile ci_intuit
Tina Su
 
PDF
Speed to Market in Mobile Development
Tina Su
 
PPTX
Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...
Imaginet
 
PDF
Getting Started With Coded UI testing: Building Your First Automated Test
Imaginet
 
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
İbrahim KIVANÇ
 
Xamarin UI Test And Xamarin Test Cloud
Emanuel Amiguinho
 
Mobile applications and automation testing
IndicThreads
 
Continuous testing at scale
Gergely Orosz
 
Getting Started with Coded UI Testing: Building Your First Automated Test
Imaginet
 
Android Apps Testing in 2019
Ivan Katunou
 
Ibm rational mobile
Roberto Pozzi
 
Benefits of using native automation tooling for mobile application testing.pptx
Mesut Günes
 
Priyanka_3.5years_Resume
Priyanka Banda
 
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...
Riccardo Coppola
 
Velocity Conference: Increasing Speed To Market In Mobile Development Through...
Intuit Inc.
 
Fight back android fragmentation
Bitbar
 
Introduction To Mobile-Automation
Mindfire Solutions
 
Automation Testing on Selenium by Quontra Solutions
QUONTRASOLUTIONS
 
Udvid din test portefølje med coded ui test og cloud load test
Peter Lindberg
 
Velocity2013 mobile ci_intuit
Tina Su
 
Velocity2013 mobile ci_intuit
Tina Su
 
Speed to Market in Mobile Development
Tina Su
 
Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...
Imaginet
 
Getting Started With Coded UI testing: Building Your First Automated Test
Imaginet
 
Ad

Recently uploaded (20)

PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
July Patch Tuesday
Ivanti
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
July Patch Tuesday
Ivanti
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Ad

Mobile testing. Xamarin.UITest approach