My team has a battery of traditional, non-ui tests for a Xamarin application. We'd like to run these tests in the XTC but haven't found much documentation about running traditional tests in the XTC.
My best guess is to load our Xamarin Unit Test app into the cloud and then use the UI controls to run and check our unit tests in this app. Is there a more straight forward way that I'm missing?
And again, just to be clear, we don't want to UI test our app directly. We've architected from the ground up using IOC so that we get about 95% test coverage without full integration testing.
For example, here's one of our tests:
[Test]
public void ExecuteThreadSafeActionThrowsNoException()
{
var test = new List<int> { 1, 2, 3 };
Assert.DoesNotThrow(() =>
{
_concurrent.ExecuteThreadSafe(() =>
{
test.Add(4);
foreach (var i in test)
{
Task.Delay(DelayTime).Wait();
}
test.Add(5);
});
});
}
Where _concurrent is an interface that has different implementations depending on Platform (iOS and Android) and OS version. All this tests is that our threading code works as expected on multiple devices.