Xamarin

UI Testing

 

Quick reminder

Test = Specification

 

Prevent Regressions

 

Automated testing on multiple devices with Test Cloud

Page Object Pattern

AAD issues

Fails locally (with iPhone SE)

 

providing password (need to edit file)

 

Xamarin XML parsing bug when trying to use different simulator

https://developer.xamarin.com/guides/testcloud/uitest/working-with/selecting-ios-simulator/

AAD solutions

Use live account = only one text box

use app.Repl()

 

providing password???

 

Xamarin XML parsing bug when trying to use different simulator???

TestCloud Issues

We are using Umair's LIVE account with single sub

cannot test changing subs/tenants scenarios

no alerts configured there - cannot test alerts

 

Nightly tests for many devices running into loop and never finish

 

Flakey xUnit tests (parrallelization?)

TestCloud solutions

Live test account

 

Reach out to VSTS guys

 

I turned off xUnit parallelization,
but isolation will help too

No tests for alerts

setup live test account with service alerts (won't work for Service Health)

 

mock data (for Service Health...or both)

VSTS issues

no option to email entire team for PR

follow up with VSTS?

 

no private runs from private branches

extra build pipeline?

 

maintaining our Mac build host is pain

MacInCloud?

Local development

need to enter user/pass every time when you rebuild app

cache token (copy/paste)?

 

need to modify SignIn helper class to enter password

write to pass file before and after login (to revert)

Local development

iPhone local build takes ~3-4 mins

turning off 'build ipa' didn't help

maybe OxyPlot?

 

current bundle id will overwrite installed Beta from Hockey App

change provisioning profile to com.microsoft.azure-local

UWP UI Testing?

No support from Xamarin Test Cloud

 

Appium?

 

VSTS?

Tips & Tricks

app.Repl()

 

private runs with TestCloud

 

remember about WaitFor and WaitForElement

 

use accessibilityLabel

Tips & Tricks

Xamarin Workbooks

 

Xamarin Test Recorder

couldn't get this to work because of AAD
(button click does not work)

DI container?

SimpleInjector?

 

AutoFac?

 

MVVMCross?

Check UI test runs after push

Check crash reports

Bonus

 

?

Questions

Xamarin UI Testing

By Jakub Jedryszek

Xamarin UI Testing

How to write and run UI Tests with Xamarin and TestCloud

  • 1,308