Reputation: 18789
I have written some UITests
for my Xamarin
application using Xamarin.UITest
I am trying to split my tests into individual Tests but sometimes the tests I run remove the previous data and my application goes back to the start-up proccess.
I have added the Xamarin.UITest.Configuration.AppDataMode.DoNotClear
attribute to the StartApp but this does not work all the time:
app = ConfigureApp.Android.ApkFile(PathToAPK).WaitTimes(new WaitTimes()).EnableLocalScreenshots().StartApp(Xamarin.UITest.Configuration.AppDataMode.DoNotClear);
When does UITest
clear the application data and how can I stop it?
Upvotes: 3
Views: 1286
Reputation: 18789
Ok So the setting the setting Xamarin.UITest.Configuration.AppDataMode.DoNotClear
in the StartApp
method does stop your application clearing the data in between tests.
But If you change your application and rebuild it then the new application will overwrite the old one clearing the data,
Or if you run the Xamarin Test Recorder
this will also wipe the data.
Which makes developing these tests horrendous!
Upvotes: 5