SlideShare a Scribd company logo
1 of 33
Xamarin.UITest.
FROM “ZERO” TO “HERO”
About
speakers
Volodymyr Kimak
Senior .NET Engineer,
Softjourn
Nadiia Pukhta
Automation QA Engineer,
Softjourn
▪ Introduction to Xamarin.UITest
▪ Xamarin.UITest architecture
▪ Local Setup
▪ Xamarin Test Recorder
▪ Selectors, Queries, Tests
▪ Backdoors
▪ 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
- is a UI Acceptance Testing framework based on
Calabash which uses C# and NUnit test engine.
Calabash is a testing library that supports writing
cross platform acceptance tests using Cucumber
and Ruby.
Calabash
Architecture
Android
Architecture
iOS
Local setup
Recording example in MacOSXamarin
Test
Recorder
▪ Tap
▪ Scroll
▪ Swipe
▪ Pinch
▪ EnterText
▪ ClearText
▪ Back
▪ Query
▪ WaitFor(No)Element
Commands
Queries ▪ Id
▪ Class
▪ Text
▪ Button
▪ Property
▪ Marked
▪ XPath
▪ Css
▪ Child
▪ etc.
Input element on the screen:
[AppCompatEditText]id:"userName"
Queries
Usage example
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();
Method of initializing REPL in the test:
app.Repl();
REPL
ITodoPageElements _elements;
public TodoPage(IApp app, Platform platform)
: base(app, platform)
{
if (Platform == Platform.Android)
{
_elements = new DTodoPageElements();
}
else if (Platform == Platform.iOS)
{
_elements= new iOSTodoPageElements();
}
}
Cross-platform structureOne test:
2 platforms
Keep Arrange-Act-Assert patternSimple test
example [Test]
public void CreateNewTodoItem()
{
LoginScreen()
.LoginAsAppUser(UInfo.uname,UInfo.pass);
TodoScreen()
.TapOnAddButton()
.AddTitle()
.ChooseDate()
.TapCreateButton()
.CheckIfItemIsCreated();
}
Test project
structure
Before
After
BONUS!
Backdoors
Changes in the source code of mobile app
[Export("TodoBackdoor")]
public void TodoBackdoor()
{
Intent i = new Intent(this, typeof(TodoActivity));
StartActivity(i);
}
Using this method in the test
App.Invoke("TodoBackdoor");
Deep Linking
ApproachesParallelism
▪ On-premises
- nUnit2 + CI
- nUnit3 (+ CI)
▪ Cloud based (Visual Studio App Center Test)
SolutionsCI/CD
Pipeline ▪ TeamCity
▪ VSTS
▪ Visual Studio App Center
CI steps: mobile app (VSTS)CI/CD
Pipeline
CI steps: UI tests (VSTS)CI/CD
Pipeline
CD steps: run tests pipeline (VSTS)CI/CD
Pipeline
CD steps: environment tasks (VSTS)CI/CD
Pipeline
CD steps: create new release (VSTS)CI/CD
Pipeline
Test Cloud
Test running
Test run result (Visual Studio App Center)
Test Cloud
Test running
Test run result (Visual Studio App Center)
Disadvantages
● Xamarin.iOS app requires a special build
(without a source code 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 software;
● 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;
● Work with your developers - teamwork forever;
Questions?
or ask later:
Nadiia:
nadiakhantia
nkhantia@softjourn.com
Volodymyr:
vova.kimak
vkimak@softjourn.com

More Related Content

What's hot

Automated Build using teamcity
Automated Build using teamcityAutomated Build using teamcity
Automated Build using teamcityMd Jawed
 
Continuous Integration for your Android projects
Continuous Integration for your Android projectsContinuous Integration for your Android projects
Continuous Integration for your Android projectsSergii Zhuk
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with AppiumLuke Maung
 
Visual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot ComparisonVisual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot ComparisonMek Srunyu Stittri
 
Git, YouTrack and TeamCity - DDDSydney 2011
Git, YouTrack and TeamCity - DDDSydney 2011Git, YouTrack and TeamCity - DDDSydney 2011
Git, YouTrack and TeamCity - DDDSydney 2011thinkddd
 
Ember js installation and create sample project, EmberJS Version check
Ember js installation and create sample project, EmberJS Version checkEmber js installation and create sample project, EmberJS Version check
Ember js installation and create sample project, EmberJS Version checkmanojbkalla
 
Using TeamCity Inside JetBrains
Using TeamCity Inside JetBrainsUsing TeamCity Inside JetBrains
Using TeamCity Inside JetBrainsEvgeniy Koshkin
 
Continuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumContinuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumEmergya
 
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Applitools
 
Cross platform test automation using Appium
Cross platform test automation using AppiumCross platform test automation using Appium
Cross platform test automation using AppiumJatin Bhasin
 
Eclipse Testing Day 2010. Xored Q7
Eclipse Testing Day 2010. Xored Q7Eclipse Testing Day 2010. Xored Q7
Eclipse Testing Day 2010. Xored Q7platoff
 
TDC2016SP - Cross-Platform Development with C#
TDC2016SP - Cross-Platform Development with C#TDC2016SP - Cross-Platform Development with C#
TDC2016SP - Cross-Platform Development with C#tdc-globalcode
 
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 JenkinsSylwester Madej
 
Tips for better CI on Android
Tips for better CI on AndroidTips for better CI on Android
Tips for better CI on AndroidTomoaki Imai
 

What's hot (20)

Automated Build using teamcity
Automated Build using teamcityAutomated Build using teamcity
Automated Build using teamcity
 
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
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
Lean Quality & Engineering
Lean Quality & EngineeringLean Quality & Engineering
Lean Quality & Engineering
 
Build Automation in Android
Build Automation in AndroidBuild Automation in Android
Build Automation in Android
 
Appium overview
Appium overviewAppium overview
Appium overview
 
Visual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot ComparisonVisual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot Comparison
 
Git, YouTrack and TeamCity - DDDSydney 2011
Git, YouTrack and TeamCity - DDDSydney 2011Git, YouTrack and TeamCity - DDDSydney 2011
Git, YouTrack and TeamCity - DDDSydney 2011
 
Eclipse RCP
Eclipse RCPEclipse RCP
Eclipse RCP
 
Ember js installation and create sample project, EmberJS Version check
Ember js installation and create sample project, EmberJS Version checkEmber js installation and create sample project, EmberJS Version check
Ember js installation and create sample project, EmberJS Version check
 
Using TeamCity Inside JetBrains
Using TeamCity Inside JetBrainsUsing TeamCity Inside JetBrains
Using TeamCity Inside JetBrains
 
Continuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumContinuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and Appium
 
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
 
Cross platform test automation using Appium
Cross platform test automation using AppiumCross platform test automation using Appium
Cross platform test automation using Appium
 
Eclipse Testing Day 2010. Xored Q7
Eclipse Testing Day 2010. Xored Q7Eclipse Testing Day 2010. Xored Q7
Eclipse Testing Day 2010. Xored Q7
 
Appium & Jenkins
Appium & JenkinsAppium & Jenkins
Appium & Jenkins
 
TDC2016SP - Cross-Platform Development with C#
TDC2016SP - Cross-Platform Development with C#TDC2016SP - Cross-Platform Development with C#
TDC2016SP - Cross-Platform Development with C#
 
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
 
Tips for better CI on Android
Tips for better CI on AndroidTips for better CI on Android
Tips for better CI on Android
 

Similar to Xamarin.UITest. From "Zero" to "Hero"

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 CloudEmanuel Amiguinho
 
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...COMAQA.BY
 
Building CI pipeline based on TeamCity & Docker in Android Team
Building CI pipeline based on TeamCity & Docker in Android TeamBuilding CI pipeline based on TeamCity & Docker in Android Team
Building CI pipeline based on TeamCity & Docker in Android TeamPaweł Gajda
 
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 SolutionsQUONTRASOLUTIONS
 
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Ç
 
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 WebinarBitbar
 
Visual Studio 2017 Launch Event
Visual Studio 2017 Launch EventVisual Studio 2017 Launch Event
Visual Studio 2017 Launch EventJames Montemagno
 
Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013Kevin Munc
 
Izumi 1.0: Your Next Scala Stack
Izumi 1.0: Your Next Scala StackIzumi 1.0: Your Next Scala Stack
Izumi 1.0: Your Next Scala Stack7mind
 
Linux Collaboration Summit Keynote: Transformation: It Takes a Platform
Linux Collaboration Summit Keynote: Transformation: It Takes a PlatformLinux Collaboration Summit Keynote: Transformation: It Takes a Platform
Linux Collaboration Summit Keynote: Transformation: It Takes a Platformcornelia davis
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648Eing Ong
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...KMS Technology
 
Overview for device farm for mobile testing
Overview for device farm for mobile testingOverview for device farm for mobile testing
Overview for device farm for mobile testingAnna Klueva
 
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 testPeter Lindberg
 
ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017Amazon Web Services
 
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...COMAQA.BY
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsAbhijeet Vaikar
 
Evolving Mobile Architectures
Evolving Mobile ArchitecturesEvolving Mobile Architectures
Evolving Mobile Architecturessgleadow
 
Testing for fun in production Into The Box 2018
Testing for fun in production Into The Box 2018Testing for fun in production Into The Box 2018
Testing for fun in production Into The Box 2018Ortus Solutions, Corp
 
froglogic Squish GUI Tester Presentation
froglogic Squish GUI Tester Presentationfroglogic Squish GUI Tester Presentation
froglogic Squish GUI Tester PresentationReginald Stadlbauer
 

Similar to Xamarin.UITest. From "Zero" to "Hero" (20)

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
 
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
 
Building CI pipeline based on TeamCity & Docker in Android Team
Building CI pipeline based on TeamCity & Docker in Android TeamBuilding CI pipeline based on TeamCity & Docker in Android Team
Building CI pipeline based on TeamCity & Docker in Android Team
 
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
 
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...
 
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
 
Visual Studio 2017 Launch Event
Visual Studio 2017 Launch EventVisual Studio 2017 Launch Event
Visual Studio 2017 Launch Event
 
Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013Ci for i-os-codemash-01.2013
Ci for i-os-codemash-01.2013
 
Izumi 1.0: Your Next Scala Stack
Izumi 1.0: Your Next Scala StackIzumi 1.0: Your Next Scala Stack
Izumi 1.0: Your Next Scala Stack
 
Linux Collaboration Summit Keynote: Transformation: It Takes a Platform
Linux Collaboration Summit Keynote: Transformation: It Takes a PlatformLinux Collaboration Summit Keynote: Transformation: It Takes a Platform
Linux Collaboration Summit Keynote: Transformation: It Takes a Platform
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
 
Overview for device farm for mobile testing
Overview for device farm for mobile testingOverview for device farm for mobile testing
Overview for device farm for mobile testing
 
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
 
ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017
 
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests
 
Evolving Mobile Architectures
Evolving Mobile ArchitecturesEvolving Mobile Architectures
Evolving Mobile Architectures
 
Testing for fun in production Into The Box 2018
Testing for fun in production Into The Box 2018Testing for fun in production Into The Box 2018
Testing for fun in production Into The Box 2018
 
froglogic Squish GUI Tester Presentation
froglogic Squish GUI Tester Presentationfroglogic Squish GUI Tester Presentation
froglogic Squish GUI Tester Presentation
 

Recently uploaded

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 

Recently uploaded (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 

Xamarin.UITest. From "Zero" to "Hero"

Editor's Notes

  1. Сьогодні ми хочемо поділитись з вами досвідом у сфері автоматизованого тестування мобільних додатків за допомогою Xamarin.UITest. Наша тема - перш за все, це приклад спільної роботи qa і девелопера, плюс - історія розвитку проекту “From ZERO - від моменту коли був написаний перший тест... “to HERO” - коли тестами покритий проект, це інтегровано в СІ і тести можуть працювати паралельно.
  2. Тестування мобільних додатків особливе тим що це повинно бути тестування в русі. (опис)...Попри все це практично на кожному проекті рано чи пізно піднімається питання автоматизації. Адже є бізнес логіка яка повинна працювати за будь яких умов. Саме тому доцільно почати писати автоматизовані тести
  3. Чому Xamarin.UITest? Якщо розглядати тестові фреймворки, він не належить до топових. В нашому випадку ми обрали його, оскільки мобільна аплікація була створена на Xamarin і для створення тестового проекту достатньо було додати Xamarin.UITest проект до солюшина. Відповідно не потрібно було заново встановлювати бібліотеки і робити додаткові налаштування. Також одразу зрозуміло що мова написання тестів та ж що і аплікації - С#. Бонусом було те, що над розробкою мобільної аплікації працювала команда, в якої можна було отримати відповідь на будь-яке питання.
  4. In Android, The Xamarin Test Cloud Agent is responsible for using the Android automation APIs to control the user interface and to locate views so that a test may interact with them. It is bundled into a separate APK and runs as a separate application, which has permission to automate the application under test. This is possible, because when the test is deployed to the mobile device, Calabash or UITest will sign both application packages with the same key.
  5. The Test Cloud Agent has a slightly different role in iOS applications – by itself it does not automate the app under test. Instead, the Test Cloud Agent will interrogate the active window and retrieve information about the views for to the user. The view information is returned to the test script. The test script will then automate the iOS application with the help of another component called the DeviceAgent. The DeviceAgent will simulate the gestures and actions for the test (using the automation API's provide with Xcode 8) and if necessary return the result of those interactions to the test
  6. А тепер перейдемо до практичної частини. З чого починати? Перш за все потрібне середовище. Отож ідемо на офіціний сайт visual studio, в залежності від ОС вибираємо Visual Studio чи Visual Studio for Mac. Підходить безкоштовна community версія. Скачуємо, вибираємо пакет встановлення для мобільної розробки, - Xamarin і встановлюємо. Також нам потрібний тест енджін, в даному випадку це nunit. Для віндовс в окремих випадках потрібно - Android sdk та Java Developers Kit, для Мак- Xcode Command Line Tools. Невеличке зауваження, На віндовс можна працювати тільки з Андроїд аплікаціями, на Mac - ios, android.
  7. Припустимо вже все встановлено, настроєно. В туторіалі пропонують взяти готовий зразок з git-hub, де вже є базова сторінка і базовий тест, і спробувати це для своєї аплікації. Або можна створити власний новий проект для кросплатформенного тестування. В моєму випадку, я створила власний і щоб зрозуміти специфіку поведінки мобільної аплікації -спробувала Xamarin Test Recorder. Я знаю як ставляться автоматизатори до рекордерів, але… перш за все - це мобільна аплікація і якщо у вас немає доступу до вихідного коду, важко зрозуміти з чим ви маєте справу, що ховається за кожним скріном. Xamarin Test Recorder потрібно окремо встановити - для віндовс це плагін і він доступний тільки для ентерпрайз версії, для VS for mac - це окремий додаток. Принцип роботи приблизно один і той же на обидвох платформах - потрібно підключити девайс, чи переконатись чи є емулятор на якому буде запускатись тестю Після запуску на віндовс - слід просто вибрати апк вайл, для Mac - девайс і апк чи апп файл і виконати послідовність дій які мають бути в тесті. В результаті створюється готовий тест з комадами які були виконані, є можливість побачити які елементи і які команди використовувались.
  8. Про команди. В принципі, тут є те чим ми з вами користуємся кожного дня, ми тапаємо,скролимо, свайпаємо, працюємо з текстом і ще є досить багато функцій які можна використати як наприклад поворот екрана чи очікування появи чи зникннення елемента на скріні. Невеличкий приклад команд.
  9. Оскільки команди виконуються над елементами, доцільно розглянути селектори. Ідеально коли у процесі розробки було створено AutomationId і тоді не піднімається питання як знайти елемент на скріні. Але ми живемо не в ідеальному світі :)
  10. І ось приклад того як можна один і той же елемент сторінки визначити різними способами.
  11. Тепер про конфігурацію. Впевнена всі знають що основна умова початку тестування - це наявність продукту який має тестуватись. Тобто потрібно вказати артефакт з яким працюватимуть тести. В даному випадку арефакт - це апк чи апп файл. І базовою конфігурацією є тільки вказаний шлях до файлу аплікації, - апк чи апп. Крім цього є багато додаткових конфігураційних команд, кожну з яких ви будете використовувати по мірі необхідності.
  12. Але.. Ми ж не будемо використовувати рекордер при розробки.Це забирає час і не завжди точні результати. Рекордер тільки для ознайомлення. Є ще одна річ, яку безпосередньо прийдеться використовувати - REPL. Взагалі REPL (Read-eval-print loop — це просте інтерактивне середовище програмування.В такому середовищі користувач може вводити вирази, які середовище одразу обчислить, а результат обчислень відобразить користувачеві. В плані Xamarin.UITest - це середовище де можна переглядати елементи, працювати з ними, виконувати команди. Для того щоб викликати REPL, потрібно вказати команду в тесті.
  13. Як вже було згадано Xamarin використовується для розробки кросплатформенних аплікації. Відовідно тести також повинні працювати як для iOS так і для Android одинаково, тобто один тест має працювати для обидвох платформ. Для вирішення цієї проблеми ми створюємо окремі пейдж-обджекти для iOS i Android а потім в залежності від платорми ініціалізуємо їх.
  14. Якщо говорити про самі тести, рекомендується використовувати Arrange-Act-Assert pattern. В даному прикладі ви не зможете побачити “Arrange” оскільки ініціалізація і старт аплікації винесено в сетап функцію. Потім виконується послідовність дій і в кінці йде перевірка чи отримано очікуваний результат.
  15. Пройшовши всі етапи про які я говорила, створивши кілька тестів і організувавши їхню структуру, звичайно, не без допомоги девелопера - з проекту розміром 2 файли, у мене вийшов досить структурований, гнучкий і як на мене інтуїтивно організований проект.
  16. Тепер буде невеличкий “ліричний” відступ. Бекдори. Є люди які знають що це? А діп-лінкінг? Здавалося б який тут може бути зв’язок. Deep Linking - це можливість відкрити конкретну сторінку використавши спеціальне посилання. Це широко використовується в рекламі - ви бачите невеличкий банер, клікаєте на нього і відкриваєте окрему сторінку. Це працює і для мобільних аплікацій, ви клікаєте на посилання і якщо у вас є аплікація, відкривається спеціальний скрін, якщо ні, йде редірект на стор. Бекдор - це спеціальна функція, яка повинна відкривати спеціальний скрін і вона додається в код мобільної аплікації. Для виклику бекдора в тесті, ми використовуємо Invoke метод. В цілому це означає що ми маємо можливість відкрити потрібний нам скрін не починаючи з стартового скріна аплікації. Чому я говорила про “Deep linking” - для використання бекдорів аплікація повинна працювати так, щоб окремий скрін міг працювати не залежно від інших, в іншому випадку це не працює. І само собою, аплікацію з бекдорами релізити не можна.