SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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 a 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 a 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
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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 Processorsdebabhi2
 
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.pdfsudhanshuwaghmare1
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 

Último (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 

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

Notas del editor

  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” - для використання бекдорів аплікація повинна працювати так, щоб окремий скрін міг працювати не залежно від інших, в іншому випадку це не працює. І само собою, аплікацію з бекдорами релізити не можна.