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

What's hot (20)

Future of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals itFuture of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals it
 
Mobile CI
Mobile CIMobile CI
Mobile CI
 
Cross Platform Mobile Technologies
Cross Platform Mobile TechnologiesCross Platform Mobile Technologies
Cross Platform Mobile Technologies
 
Automated Build using teamcity
Automated Build using teamcityAutomated Build using teamcity
Automated Build using teamcity
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
Continuous Integration for your Android projects
Continuous Integration for your Android projectsContinuous Integration for your Android projects
Continuous Integration for your Android projects
 
Ci for-android-apps
Ci for-android-appsCi for-android-apps
Ci for-android-apps
 
Build Automation in Android
Build Automation in AndroidBuild Automation in Android
Build Automation in Android
 
Lean Quality & Engineering
Lean Quality & EngineeringLean Quality & Engineering
Lean Quality & Engineering
 
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений" Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
 
Using TeamCity Inside JetBrains
Using TeamCity Inside JetBrainsUsing TeamCity Inside JetBrains
Using TeamCity Inside JetBrains
 
TDC2016SP - Cross-Platform Development with C#
TDC2016SP - Cross-Platform Development with C#TDC2016SP - Cross-Platform Development with C#
TDC2016SP - Cross-Platform Development with C#
 
Eclipse Testing Day 2010. Xored Q7
Eclipse Testing Day 2010. Xored Q7Eclipse Testing Day 2010. Xored Q7
Eclipse Testing Day 2010. Xored Q7
 
'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020
'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020
'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020
 
Visual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot ComparisonVisual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot Comparison
 
Eclipse RCP
Eclipse RCPEclipse RCP
Eclipse RCP
 
Jumpstart application development
Jumpstart application developmentJumpstart application development
Jumpstart application development
 
Jumpstart application development
Jumpstart application developmentJumpstart application development
Jumpstart application development
 
Continous UI testing with Espresso and Jenkins
Continous UI testing with Espresso and JenkinsContinous UI testing with Espresso and Jenkins
Continous UI testing with Espresso and Jenkins
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
 

Similar to Mobile testing. Xamarin.UITest approach

Priyanka_3.5years_Resume
Priyanka_3.5years_ResumePriyanka_3.5years_Resume
Priyanka_3.5years_Resume
Priyanka Banda
 
Automation Testing on Selenium by Quontra Solutions
Automation Testing on Selenium by Quontra SolutionsAutomation Testing on Selenium by Quontra Solutions
Automation Testing on Selenium by Quontra Solutions
QUONTRASOLUTIONS
 
Velocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuitVelocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuit
Tina Su
 
Velocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuitVelocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuit
Tina Su
 

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

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...
 
Xamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test CloudXamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test Cloud
 
Mobile applications and automation testing
Mobile applications and automation testingMobile applications and automation testing
Mobile applications and automation testing
 
Continuous testing at scale
Continuous testing at scaleContinuous testing at scale
Continuous testing at scale
 
Getting Started with Coded UI Testing: Building Your First Automated Test
Getting Started with Coded UI Testing: Building Your First Automated TestGetting Started with Coded UI Testing: Building Your First Automated Test
Getting Started with Coded UI Testing: Building Your First Automated Test
 
Android Apps Testing in 2019
Android Apps Testing in 2019Android Apps Testing in 2019
Android Apps Testing in 2019
 
Ibm rational mobile
Ibm rational mobileIbm rational mobile
Ibm rational mobile
 
Benefits of using native automation tooling for mobile application testing.pptx
Benefits of using native automation tooling for mobile application testing.pptxBenefits of using native automation tooling for mobile application testing.pptx
Benefits of using native automation tooling for mobile application testing.pptx
 
Priyanka_3.5years_Resume
Priyanka_3.5years_ResumePriyanka_3.5years_Resume
Priyanka_3.5years_Resume
 
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...
 
Velocity Conference: Increasing Speed To Market In Mobile Development Through...
Velocity Conference: Increasing Speed To Market In Mobile Development Through...Velocity Conference: Increasing Speed To Market In Mobile Development Through...
Velocity Conference: Increasing Speed To Market In Mobile Development Through...
 
Fight back android fragmentation
Fight back android fragmentationFight back android fragmentation
Fight back android fragmentation
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-Automation
 
Automation Testing on Selenium by Quontra Solutions
Automation Testing on Selenium by Quontra SolutionsAutomation Testing on Selenium by Quontra Solutions
Automation Testing on Selenium by Quontra Solutions
 
Udvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testUdvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load test
 
Velocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuitVelocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuit
 
Speed to Market in Mobile Development
Speed to Market in Mobile DevelopmentSpeed to Market in Mobile Development
Speed to Market in Mobile Development
 
Velocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuitVelocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuit
 
Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...
Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...
Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...
 
Getting Started With Coded UI testing: Building Your First Automated Test
Getting Started With Coded UI testing: Building Your First Automated TestGetting Started With Coded UI testing: Building Your First Automated Test
Getting Started With Coded UI testing: Building Your First Automated Test
 

Recently uploaded

Recently uploaded (20)

Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Mobile testing. Xamarin.UITest approach