SlideShare a Scribd company logo
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
PRESENTER
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
Codrina Merigo
Software Engineer
Q&A SEGMENT
• Q&A segment will be at the end of the webinar.
• Please enter your questions in the Questions window.
• A recording of the webinar will be available within a week.
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
Unit Tests are normally written by the developers who
write test code to verify the functionalities that were
developed by them.
Picture credits : https://mobilefirstcloudfirst.net/wp-content/uploads/2017/01/Test-Pyramid-1024
UI Tests This is the layer where you would be testing
the product more from an end-user’s perspective.
Your top priority would be to ensure that ‘UI Design Flow’
is in-line with the design requirements.
Service Tests helps you ensure that the services
are working properly and give you the right data.
APP Testing
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
Since the testing at UI level is so brittle,
it is recommended to focus on these tests
to only verify ‘UI flow & interactions’
without looking into the system functionality.
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
How would you test UI manually?
Lets say you want to login into an application.
You need to enter your username and password into the text field
and the password field respectively and then click on the “Login" button.
If you want to do it manually, you first search or locate where the username field is.
Then, you interact with it by typing your username into the field.
You would do the same with the password field.
You would then search or locate where the "Sign In" button is and click it.
Then you assure that you actually logged in.
1
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
The two main tasks that you do manually are:
Locate what the element you want and
Interact with it
1
You will do the same in your automated
UI Test!
2
1
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
Fast - ui tests are slow but dev must try not to write them even slower
Independent - not use other tests
Repeatable - not use constants like access tokens
Self-validating - by using asserts
Timely - try not to be very complicated, maybe an action can be split in multiple tests
FIRST Principles
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
Setting up the project
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
if (platform == Platform.Android)
{
return ConfigureApp.Android
.EnableLocalScreenshots()
.DeviceSerial(DroidDeviceID)
.Debug()
.ApkFile(ApkPath)
.StartApp();
}
else
return ConfigureApp.iOS
.EnableLocalScreenshots()
.Debug()
.DeviceIdentifier(IOSDeviceID)
.AppBundle(AppPath)
.StartApp();
To find the ios device id run instruments -s devices on your mac,
for android launch adb devices from command line
ApkPath is something like "C:UsersProjectsMyAppMyApp.AndroidbinDebugmyApp.apk"
AppAPath for the ipa is something like ="../../../MyApp/MyApp.iOS/bin/iPhoneSimulator/Debug/MyApp.iOS.app"
UI Test Project
February 2020
DEMO
app.Flash(e=>e.All())
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
The REPL is a console-like environment in which the developer enters expressions or commands.
It will then evaluate those expressions and display the results to the user.
tree
app.Query(e =>
e.All())
Repl() - read-eval-print-loop
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
The REPL is helpful when creating
UITests as it allows us to explore the
user interface
and create the queries and
statements so that the test may
interact with the application.
February 2020
DEMO
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
Verify your views and controls on the screen
Check for navigation between pages
Interact with ‘live’ elements like buttons, checkboxes, switches or tabs
What should you UI Test for?
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
Sample
Arrange, Act, Assert
public int MySum(int a, int b)
{
return a + b;
}
[Test]
public void TestMySum()
{
// Arrange
int a = 5;
int b = 7;
// Act
int result = MySum(a, b);
// Assert
Assert.AreEqual(12, result);
}
AAA Pattern
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
This process allows you to write tests a non-technical language that
everyone can understand (e.g. a domain-specific language like Gherkin).
BDD forms an approach for building a shared understanding on what
kind of software to build by discussing examples.
Behavior Driven Development
Given When Then
As a [role]
I want [feature]
So that [benefit]
As a registered user,
I want to be able to login,
so that I can see the Application.
Scenario 1: User is able to log in.
Given that I am a registered user,
when I enter the username ‘Codrina’
and password ‘ladybug’,
then I should see
the first screen of the app.
Sample
BDD Approach
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
In order to identify a control on the screen, each control needs an unique identifier called
AutomationId set to the visual element, for example:
<Label x:Name="label1" AutomationId="MyLabel" Text="Hello, Xamarin.Forms!" />
Or
var label1 = new Label {
Text = "Hello, Xamarin.Forms!",
AutomationId = "MyLabel"
};
It’s important also to write every single action and
not take anything for granted
Meet the AutomationId
February 2020
DEMO
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
UI Automation is supposed to run slow
in order to emulate an actual user
interaction - keep that in mind that
sometimes we may wait for an element
to pop on the screen before we verify if
it is actually on the screen.
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
Samples
//label
bool myLabel = app.Query(e => e.Marked(“MyLabel")).Any();
app.Tap(“MyLabel");
//swipe gestures
app.SwipeLeftToRight();
//entry
app.Tap(“MyEntry");
app.EnterText(Constants.Value);
app.DismissKeyboard();
Queries inside and outside Repl()
February 2020
DEMO
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
Samples
//syncfusion element
switches = app.Query(e => e.Marked("SfSwitch Control. State changed"));
x = (float)switches[c].Rect.CenterX;
y = (float)switches[c].Rect.CenterY;
app.TapCoordinates(x, y);
//inside webview
/*through Safari for iOS
and through Chrome for Android
use the browser developer tools
to visually identify
the elements inside the DOM.*/
app.Tap(c => c.WebView().Css("#element"));
More queries
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
Sometimes it is necessary to pause test execution while waiting for the user interface to update while a
long running action is in progress. UITest provides two API's to address these concerns:
IApp.WaitForElement
IApp.WaitForNoElement
app.WaitForElement(c=>c.Marked(”MyLabel”),
“Did not see MyLabel”.",
new TimeSpan(0,0,0,90,0));
Waiting for elements
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
May happen that the element you want to interact to, is down in the page, away from your viewport so a
scrolling action must be performed.
IApp.ScrollDownTo(Func<AppQuery, AppWebQuery> toQuery,
string withinMarked,
ScrollStrategy strategy,
Nullable<TimeSpan> timeout)
app.ScrollDownTo(c => e.Marked(“MyLabel"));
Scrolling to elements
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
UITest provides a very large number of API's to simulate gestures or physical interactions with the device.
Some (but not all) of these API's are listed below:
IApp.DoubleTap – Performs two quick taps on the first matched view.
IApp.DragCoordinates – This method simulates a continuous drag between two points.
IApp.PinchToZoomIn – This method will perform a pinch gesture on the matched view to zoom in.
IApp.PinchToZoomOut – This method will perform a pinch gesture on the matched view to zoom
out.
IApp.ScrollUp / IApp.ScrollDown – Performs a touch gesture that scrolls down or up.
IApp.SwipeLeftToRight / IApp.RightToLeft – This will simulate a left-to-right or a right-to-left
gesture swipe.
IApp.Tap – This will tap the first matched element.
IApp.TouchAndHold – This method will continuously touch view.
app.DoubleTap(c=>c.Marked (“MyLabel"));
Gestures
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
At any time, in your ui test, you can take a screenshot of the current view for further checks or you might
want to take a screenshot if a test is not passing.
Screenshots saved with App.Screenshot() are located in your test project's directory:
MyTestProject"binDebug folder
app.Screenshot(“MyScreenshot");
Screenshots
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
Writing the test in natural language
and performing them manually before
coding them can help you write
complete automated tests.
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
appCenter
Validation
Upload package and UI Test
using nodeJs and following
app center instruction
Wait for
devices
Run on first device when
ready
Run on second device when
ready
Run on nth device when
ready
Configure your run by selecting
Generate report for
results
Run on third device when
ready
Run your tests on App Center Test Cloud
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
App Center Test Cloud Reports
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
From app center you get:
appcenter test run uitest
--app "codrinamerigo/LadyBug"
--devices "codrinamerigo/android-
test"
--app-path pathToFile.apk
--test-series "master"
--locale "en_US"
--build-dir pathToUITestBuildDir
Enable task
Add UI Tests to DevOps using AppCenter
Copyright © 2020 Syncfusion, Inc. All rights reserved.
February 2020
If sometimes, the iOS simulator doesn’t pop on the screen,
might be useful to delete the xdb folder inside TMPDIR (on the Mac machine) and retry.
For debug purpose, right-click on the iOS Project > Options > Compiler and add the string
ENABLE_TEST_CLOUD
Try to write no more that 20 ui tests per project to run them locally…
Open the Android simulator on your Mac before running the tests
Don’t forget about your UI Test – try to keep them live
UI Tests aren't compatible with the Shared Mono Runtime, so remember to disable it for Android!
From myexperience . . .
ALL THE TOOLS. ONE FLAT FEE. NO HASSLE.
Connect with us on social media:
Give us a call:
Toll Free: +1 888.936.8638 (US)
Phone: +1 919.481.1974 (World)
Send us an email:
sales@syncfusion.com
Copyright © 2020 Syncfusion, Inc. All rights reserved.
January 2020
_Codrina_

More Related Content

What's hot

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
Geoffrey Goetz
 
Multiple Activity and Navigation Primer
Multiple Activity and Navigation PrimerMultiple Activity and Navigation Primer
Multiple Activity and Navigation Primer
Ahsanul Karim
 
Titanium Appcelerator - Beginners
Titanium Appcelerator - BeginnersTitanium Appcelerator - Beginners
Titanium Appcelerator - Beginners
Ambarish Hazarnis
 
UIAutomator
UIAutomatorUIAutomator
UIAutomator
Sandip Ganguli
 
Beginning Android Development
Beginning Android DevelopmentBeginning Android Development
Beginning Android Development
José Ferreiro
 
Android Wearable App
Android Wearable AppAndroid Wearable App
Android Wearable App
Mindfire Solutions
 
Advance UIAutomator : Documentaion
Advance UIAutomator : DocumentaionAdvance UIAutomator : Documentaion
Advance UIAutomator : Documentaion
Raman Gowda Hullur
 
I Phone101
I Phone101I Phone101
I Phone101
Febrian ‎
 
21 android2 updated
21 android2 updated21 android2 updated
21 android2 updated
GhanaGTUG
 
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for AndroidYour First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Motorola Mobility - MOTODEV
 
Android Intro
Android IntroAndroid Intro
Android Intro
Justin Grammens
 
Android Wear Presentation
Android Wear PresentationAndroid Wear Presentation
Android Wear Presentation
Zi Yong Chua
 
Developing for Android Wear
Developing for Android WearDeveloping for Android Wear
Developing for Android Wear
Can Elmas
 
Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5
Chris Griffith
 
Android Wear Development
Android Wear DevelopmentAndroid Wear Development
Android Wear Development
Takahiro (Poly) Horikawa
 
Flutter Festivals IIT Goa Session 2
Flutter Festivals IIT Goa Session 2Flutter Festivals IIT Goa Session 2
Flutter Festivals IIT Goa Session 2
SEJALGUPTA44
 
Being Epic: Best Practices for Android Development
Being Epic: Best Practices for Android DevelopmentBeing Epic: Best Practices for Android Development
Being Epic: Best Practices for Android Development
Reto Meier
 
Swift
SwiftSwift
Swift
Larry Ball
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applications
TOPS Technologies
 
Day: 2 Environment Setup for Android Application Development
Day: 2 Environment Setup for Android Application DevelopmentDay: 2 Environment Setup for Android Application Development
Day: 2 Environment Setup for Android Application Development
Ahsanul Karim
 

What's hot (20)

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
 
Multiple Activity and Navigation Primer
Multiple Activity and Navigation PrimerMultiple Activity and Navigation Primer
Multiple Activity and Navigation Primer
 
Titanium Appcelerator - Beginners
Titanium Appcelerator - BeginnersTitanium Appcelerator - Beginners
Titanium Appcelerator - Beginners
 
UIAutomator
UIAutomatorUIAutomator
UIAutomator
 
Beginning Android Development
Beginning Android DevelopmentBeginning Android Development
Beginning Android Development
 
Android Wearable App
Android Wearable AppAndroid Wearable App
Android Wearable App
 
Advance UIAutomator : Documentaion
Advance UIAutomator : DocumentaionAdvance UIAutomator : Documentaion
Advance UIAutomator : Documentaion
 
I Phone101
I Phone101I Phone101
I Phone101
 
21 android2 updated
21 android2 updated21 android2 updated
21 android2 updated
 
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for AndroidYour First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
 
Android Intro
Android IntroAndroid Intro
Android Intro
 
Android Wear Presentation
Android Wear PresentationAndroid Wear Presentation
Android Wear Presentation
 
Developing for Android Wear
Developing for Android WearDeveloping for Android Wear
Developing for Android Wear
 
Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5
 
Android Wear Development
Android Wear DevelopmentAndroid Wear Development
Android Wear Development
 
Flutter Festivals IIT Goa Session 2
Flutter Festivals IIT Goa Session 2Flutter Festivals IIT Goa Session 2
Flutter Festivals IIT Goa Session 2
 
Being Epic: Best Practices for Android Development
Being Epic: Best Practices for Android DevelopmentBeing Epic: Best Practices for Android Development
Being Epic: Best Practices for Android Development
 
Swift
SwiftSwift
Swift
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applications
 
Day: 2 Environment Setup for Android Application Development
Day: 2 Environment Setup for Android Application DevelopmentDay: 2 Environment Setup for Android Application Development
Day: 2 Environment Setup for Android Application Development
 

Similar to UI Testing for Your Xamarin.Forms Apps

Xam expertday
Xam expertdayXam expertday
Xam expertday
Codrina Merigo
 
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CAAppcelerator iPhone/iPad Dev Con 2010 San Diego, CA
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
Jeff Haynie
 
iPhone/iPad Development with Titanium
iPhone/iPad Development with TitaniumiPhone/iPad Development with Titanium
iPhone/iPad Development with Titanium
Axway Appcelerator
 
Andriod dev toolbox part 2
Andriod dev toolbox  part 2Andriod dev toolbox  part 2
Andriod dev toolbox part 2
Shem Magnezi
 
Visual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot ComparisonVisual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot Comparison
Mek Srunyu Stittri
 
Android testing
Android testingAndroid testing
Android testing
Bitbar
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhone
Erin Dees
 
Real-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet AppReal-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet App
Mike Taylor
 
Top 15 Appium Interview Questions and Answers in 2023.pptx
Top 15 Appium Interview Questions and Answers in 2023.pptxTop 15 Appium Interview Questions and Answers in 2023.pptx
Top 15 Appium Interview Questions and Answers in 2023.pptx
AnanthReddy38
 
Better User Experience with .NET
Better User Experience with .NETBetter User Experience with .NET
Better User Experience with .NET
Peter Gfader
 
How to feature flag and run experiments in iOS and Android
How to feature flag and run experiments in iOS and AndroidHow to feature flag and run experiments in iOS and Android
How to feature flag and run experiments in iOS and Android
Optimizely
 
Visual Studio 2015 / Visual Studio Team Services Overview
Visual Studio 2015 / Visual Studio Team Services OverviewVisual Studio 2015 / Visual Studio Team Services Overview
Visual Studio 2015 / Visual Studio Team Services Overview
Himanshu Desai
 
Flutter App Performance Optimization_ Tips and Techniques.pdf
Flutter App Performance Optimization_ Tips and Techniques.pdfFlutter App Performance Optimization_ Tips and Techniques.pdf
Flutter App Performance Optimization_ Tips and Techniques.pdf
DianApps Technologies
 
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
Anna Russo
 
Using Edge Animate to Create a Reusable Component Set
Using Edge Animate to Create a Reusable Component SetUsing Edge Animate to Create a Reusable Component Set
Using Edge Animate to Create a Reusable Component Set
Joseph Labrecque
 
Madhusmita mohanty_MohantyCV
Madhusmita mohanty_MohantyCVMadhusmita mohanty_MohantyCV
Madhusmita mohanty_MohantyCV
madhusmita mohanty
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
Bitbar
 
5 Popular Test Automation Tools For React Native Apps.pdf
5 Popular Test Automation Tools For React Native Apps.pdf5 Popular Test Automation Tools For React Native Apps.pdf
5 Popular Test Automation Tools For React Native Apps.pdf
flufftailshop
 
Coded ui test
Coded ui testCoded ui test
Coded ui test
Abhimanyu Singhal
 
Mobile application development React Native - Tidepool Labs
Mobile application development React Native - Tidepool LabsMobile application development React Native - Tidepool Labs
Mobile application development React Native - Tidepool Labs
Harutyun Abgaryan
 

Similar to UI Testing for Your Xamarin.Forms Apps (20)

Xam expertday
Xam expertdayXam expertday
Xam expertday
 
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CAAppcelerator iPhone/iPad Dev Con 2010 San Diego, CA
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
 
iPhone/iPad Development with Titanium
iPhone/iPad Development with TitaniumiPhone/iPad Development with Titanium
iPhone/iPad Development with Titanium
 
Andriod dev toolbox part 2
Andriod dev toolbox  part 2Andriod dev toolbox  part 2
Andriod dev toolbox part 2
 
Visual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot ComparisonVisual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot Comparison
 
Android testing
Android testingAndroid testing
Android testing
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhone
 
Real-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet AppReal-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet App
 
Top 15 Appium Interview Questions and Answers in 2023.pptx
Top 15 Appium Interview Questions and Answers in 2023.pptxTop 15 Appium Interview Questions and Answers in 2023.pptx
Top 15 Appium Interview Questions and Answers in 2023.pptx
 
Better User Experience with .NET
Better User Experience with .NETBetter User Experience with .NET
Better User Experience with .NET
 
How to feature flag and run experiments in iOS and Android
How to feature flag and run experiments in iOS and AndroidHow to feature flag and run experiments in iOS and Android
How to feature flag and run experiments in iOS and Android
 
Visual Studio 2015 / Visual Studio Team Services Overview
Visual Studio 2015 / Visual Studio Team Services OverviewVisual Studio 2015 / Visual Studio Team Services Overview
Visual Studio 2015 / Visual Studio Team Services Overview
 
Flutter App Performance Optimization_ Tips and Techniques.pdf
Flutter App Performance Optimization_ Tips and Techniques.pdfFlutter App Performance Optimization_ Tips and Techniques.pdf
Flutter App Performance Optimization_ Tips and Techniques.pdf
 
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
 
Using Edge Animate to Create a Reusable Component Set
Using Edge Animate to Create a Reusable Component SetUsing Edge Animate to Create a Reusable Component Set
Using Edge Animate to Create a Reusable Component Set
 
Madhusmita mohanty_MohantyCV
Madhusmita mohanty_MohantyCVMadhusmita mohanty_MohantyCV
Madhusmita mohanty_MohantyCV
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
 
5 Popular Test Automation Tools For React Native Apps.pdf
5 Popular Test Automation Tools For React Native Apps.pdf5 Popular Test Automation Tools For React Native Apps.pdf
5 Popular Test Automation Tools For React Native Apps.pdf
 
Coded ui test
Coded ui testCoded ui test
Coded ui test
 
Mobile application development React Native - Tidepool Labs
Mobile application development React Native - Tidepool LabsMobile application development React Native - Tidepool Labs
Mobile application development React Native - Tidepool Labs
 

Recently uploaded

Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 

Recently uploaded (20)

Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 

UI Testing for Your Xamarin.Forms Apps

  • 1. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020
  • 2. PRESENTER Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 Codrina Merigo Software Engineer
  • 3. Q&A SEGMENT • Q&A segment will be at the end of the webinar. • Please enter your questions in the Questions window. • A recording of the webinar will be available within a week. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020
  • 4. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020
  • 5. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 Unit Tests are normally written by the developers who write test code to verify the functionalities that were developed by them. Picture credits : https://mobilefirstcloudfirst.net/wp-content/uploads/2017/01/Test-Pyramid-1024 UI Tests This is the layer where you would be testing the product more from an end-user’s perspective. Your top priority would be to ensure that ‘UI Design Flow’ is in-line with the design requirements. Service Tests helps you ensure that the services are working properly and give you the right data. APP Testing
  • 6. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 Since the testing at UI level is so brittle, it is recommended to focus on these tests to only verify ‘UI flow & interactions’ without looking into the system functionality.
  • 7. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 How would you test UI manually? Lets say you want to login into an application. You need to enter your username and password into the text field and the password field respectively and then click on the “Login" button. If you want to do it manually, you first search or locate where the username field is. Then, you interact with it by typing your username into the field. You would do the same with the password field. You would then search or locate where the "Sign In" button is and click it. Then you assure that you actually logged in. 1
  • 8. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 The two main tasks that you do manually are: Locate what the element you want and Interact with it 1 You will do the same in your automated UI Test! 2 1
  • 9. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 Fast - ui tests are slow but dev must try not to write them even slower Independent - not use other tests Repeatable - not use constants like access tokens Self-validating - by using asserts Timely - try not to be very complicated, maybe an action can be split in multiple tests FIRST Principles
  • 10. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 Setting up the project
  • 11. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 if (platform == Platform.Android) { return ConfigureApp.Android .EnableLocalScreenshots() .DeviceSerial(DroidDeviceID) .Debug() .ApkFile(ApkPath) .StartApp(); } else return ConfigureApp.iOS .EnableLocalScreenshots() .Debug() .DeviceIdentifier(IOSDeviceID) .AppBundle(AppPath) .StartApp(); To find the ios device id run instruments -s devices on your mac, for android launch adb devices from command line ApkPath is something like "C:UsersProjectsMyAppMyApp.AndroidbinDebugmyApp.apk" AppAPath for the ipa is something like ="../../../MyApp/MyApp.iOS/bin/iPhoneSimulator/Debug/MyApp.iOS.app" UI Test Project
  • 13. app.Flash(e=>e.All()) Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 The REPL is a console-like environment in which the developer enters expressions or commands. It will then evaluate those expressions and display the results to the user. tree app.Query(e => e.All()) Repl() - read-eval-print-loop
  • 14. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 The REPL is helpful when creating UITests as it allows us to explore the user interface and create the queries and statements so that the test may interact with the application.
  • 16. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 Verify your views and controls on the screen Check for navigation between pages Interact with ‘live’ elements like buttons, checkboxes, switches or tabs What should you UI Test for?
  • 17. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 Sample Arrange, Act, Assert public int MySum(int a, int b) { return a + b; } [Test] public void TestMySum() { // Arrange int a = 5; int b = 7; // Act int result = MySum(a, b); // Assert Assert.AreEqual(12, result); } AAA Pattern
  • 18. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 This process allows you to write tests a non-technical language that everyone can understand (e.g. a domain-specific language like Gherkin). BDD forms an approach for building a shared understanding on what kind of software to build by discussing examples. Behavior Driven Development Given When Then As a [role] I want [feature] So that [benefit] As a registered user, I want to be able to login, so that I can see the Application. Scenario 1: User is able to log in. Given that I am a registered user, when I enter the username ‘Codrina’ and password ‘ladybug’, then I should see the first screen of the app. Sample BDD Approach
  • 19. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 In order to identify a control on the screen, each control needs an unique identifier called AutomationId set to the visual element, for example: <Label x:Name="label1" AutomationId="MyLabel" Text="Hello, Xamarin.Forms!" /> Or var label1 = new Label { Text = "Hello, Xamarin.Forms!", AutomationId = "MyLabel" }; It’s important also to write every single action and not take anything for granted Meet the AutomationId
  • 21. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 UI Automation is supposed to run slow in order to emulate an actual user interaction - keep that in mind that sometimes we may wait for an element to pop on the screen before we verify if it is actually on the screen.
  • 22. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 Samples //label bool myLabel = app.Query(e => e.Marked(“MyLabel")).Any(); app.Tap(“MyLabel"); //swipe gestures app.SwipeLeftToRight(); //entry app.Tap(“MyEntry"); app.EnterText(Constants.Value); app.DismissKeyboard(); Queries inside and outside Repl()
  • 24. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 Samples //syncfusion element switches = app.Query(e => e.Marked("SfSwitch Control. State changed")); x = (float)switches[c].Rect.CenterX; y = (float)switches[c].Rect.CenterY; app.TapCoordinates(x, y); //inside webview /*through Safari for iOS and through Chrome for Android use the browser developer tools to visually identify the elements inside the DOM.*/ app.Tap(c => c.WebView().Css("#element")); More queries
  • 25. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 Sometimes it is necessary to pause test execution while waiting for the user interface to update while a long running action is in progress. UITest provides two API's to address these concerns: IApp.WaitForElement IApp.WaitForNoElement app.WaitForElement(c=>c.Marked(”MyLabel”), “Did not see MyLabel”.", new TimeSpan(0,0,0,90,0)); Waiting for elements
  • 26. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 May happen that the element you want to interact to, is down in the page, away from your viewport so a scrolling action must be performed. IApp.ScrollDownTo(Func<AppQuery, AppWebQuery> toQuery, string withinMarked, ScrollStrategy strategy, Nullable<TimeSpan> timeout) app.ScrollDownTo(c => e.Marked(“MyLabel")); Scrolling to elements
  • 27. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 UITest provides a very large number of API's to simulate gestures or physical interactions with the device. Some (but not all) of these API's are listed below: IApp.DoubleTap – Performs two quick taps on the first matched view. IApp.DragCoordinates – This method simulates a continuous drag between two points. IApp.PinchToZoomIn – This method will perform a pinch gesture on the matched view to zoom in. IApp.PinchToZoomOut – This method will perform a pinch gesture on the matched view to zoom out. IApp.ScrollUp / IApp.ScrollDown – Performs a touch gesture that scrolls down or up. IApp.SwipeLeftToRight / IApp.RightToLeft – This will simulate a left-to-right or a right-to-left gesture swipe. IApp.Tap – This will tap the first matched element. IApp.TouchAndHold – This method will continuously touch view. app.DoubleTap(c=>c.Marked (“MyLabel")); Gestures
  • 28. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 At any time, in your ui test, you can take a screenshot of the current view for further checks or you might want to take a screenshot if a test is not passing. Screenshots saved with App.Screenshot() are located in your test project's directory: MyTestProject"binDebug folder app.Screenshot(“MyScreenshot"); Screenshots
  • 29. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 Writing the test in natural language and performing them manually before coding them can help you write complete automated tests.
  • 30. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 appCenter Validation Upload package and UI Test using nodeJs and following app center instruction Wait for devices Run on first device when ready Run on second device when ready Run on nth device when ready Configure your run by selecting Generate report for results Run on third device when ready Run your tests on App Center Test Cloud
  • 31. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 App Center Test Cloud Reports
  • 32. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 From app center you get: appcenter test run uitest --app "codrinamerigo/LadyBug" --devices "codrinamerigo/android- test" --app-path pathToFile.apk --test-series "master" --locale "en_US" --build-dir pathToUITestBuildDir Enable task Add UI Tests to DevOps using AppCenter
  • 33. Copyright © 2020 Syncfusion, Inc. All rights reserved. February 2020 If sometimes, the iOS simulator doesn’t pop on the screen, might be useful to delete the xdb folder inside TMPDIR (on the Mac machine) and retry. For debug purpose, right-click on the iOS Project > Options > Compiler and add the string ENABLE_TEST_CLOUD Try to write no more that 20 ui tests per project to run them locally… Open the Android simulator on your Mac before running the tests Don’t forget about your UI Test – try to keep them live UI Tests aren't compatible with the Shared Mono Runtime, so remember to disable it for Android! From myexperience . . .
  • 34. ALL THE TOOLS. ONE FLAT FEE. NO HASSLE. Connect with us on social media: Give us a call: Toll Free: +1 888.936.8638 (US) Phone: +1 919.481.1974 (World) Send us an email: sales@syncfusion.com Copyright © 2020 Syncfusion, Inc. All rights reserved. January 2020 _Codrina_

Editor's Notes

  1. Iapp.Flash
  2. Visual studio and project
  3. Iapp.Flash
  4. Iapp.Flash
  5. repl
  6. aproaches
  7. Here we have an example of a function, that given two integers, a and b, I returns ‘a+b’ . So a simple way of using the pattern might be : Another way of writing the ui tests is using the so called feature files that are written in some cases of ‘ behavior driven development or BDD.
  8. (for example: the keyboard pops on the screen, an input text is always empty, the keyboard disappears or hides a part of the screen which contains the ‘Login’ button, the popup is shown and is completely loaded)
  9. automationid
  10. First ui test
  11. toQuery – this is a UITest web query that will locate a DOM element in the web view. withinMarked – this is a string that will located the web view on the screen. This parameter is optional if there is only one web view on the screen. This string will used by IApp.Marked to locate the web view on the screen. strategy – this optional parameter tells UITest how to scroll within the web view. ScrollStrategy.Gesture will try to emulate how a user would scroll, by dragging the screen. ScrollStrategy.Programatic frees up UITest to scroll in the quickest way possible. ScrollStrategy.Auto tells UITest to use any combination of Gesture and Programatic to scroll (with a preference to Programatic). timeout – an optional parameter that specifies how long UITest should wait before timing out the query.
  12. toQuery – this is a UITest web query that will locate a DOM element in the web view. withinMarked – this is a string that will located the web view on the screen. This parameter is optional if there is only one web view on the screen. This string will used by IApp.Marked to locate the web view on the screen. strategy – this optional parameter tells UITest how to scroll within the web view. ScrollStrategy.Gesture will try to emulate how a user would scroll, by dragging the screen. ScrollStrategy.Programatic frees up UITest to scroll in the quickest way possible. ScrollStrategy.Auto tells UITest to use any combination of Gesture and Programatic to scroll (with a preference to Programatic). timeout – an optional parameter that specifies how long UITest should wait before timing out the query.
  13. toQuery – this is a UITest web query that will locate a DOM element in the web view. withinMarked – this is a string that will located the web view on the screen. This parameter is optional if there is only one web view on the screen. This string will used by IApp.Marked to locate the web view on the screen. strategy – this optional parameter tells UITest how to scroll within the web view. ScrollStrategy.Gesture will try to emulate how a user would scroll, by dragging the screen. ScrollStrategy.Programatic frees up UITest to scroll in the quickest way possible. ScrollStrategy.Auto tells UITest to use any combination of Gesture and Programatic to scroll (with a preference to Programatic). timeout – an optional parameter that specifies how long UITest should wait before timing out the query.
  14. toQuery – this is a UITest web query that will locate a DOM element in the web view. withinMarked – this is a string that will located the web view on the screen. This parameter is optional if there is only one web view on the screen. This string will used by IApp.Marked to locate the web view on the screen. strategy – this optional parameter tells UITest how to scroll within the web view. ScrollStrategy.Gesture will try to emulate how a user would scroll, by dragging the screen. ScrollStrategy.Programatic frees up UITest to scroll in the quickest way possible. ScrollStrategy.Auto tells UITest to use any combination of Gesture and Programatic to scroll (with a preference to Programatic). timeout – an optional parameter that specifies how long UITest should wait before timing out the query.
  15. Don’t use the shared runtime: You can turn off the shared mono runtime from the project properties. In Visual Studio for Windows you’ll find it in the ‘Android Options’ tab at the top of the ‘Packaging’ page, on Mac it’s on the ‘Android Build’ tab at the top of the ‘General’ page. Untick the ‘Use Shared Mono Runtime’ box to turn this off, but be aware that this increases your build times. Release builds: Release builds don’t have the shared mono runtime turned on. After all, when you build a release version it’s usually for deployment such as to the store, and your users won’t have the shared mono runtime installed. The downside to using a release build is that you need to grant your app permission to access the internet. This isn’t a problem if your app already accesses the internet, but if it doesn’t you many not want to ask your users for this extra permission as they might not want to grant it. If you want to use a release build, then you can grant this permission in Visual Studio by opening the project properties, heading to the ‘Android Manifest’ tab and finding the INTERNET permission in the ‘Required Permissions’ list and ticking it. On Mac, double-click on the AndroidManifest.xml file in the Properties folder and tick the permission.