Automated UI testing
While unit tests ensure that a significant amount of code is tested, it is specifically focused on testing the logic within the app, leaving the user interface largely untested. This is where UI testing comes into play. UI testing allows us to automate specific actions within the app's user interface to assert that they function properly—just like regular unit tests assert that business logic delivers the desired results or functionality.
Xamarin provides a very rich set of tools for performing automated UI tests—both locally and in the Xamarin Test Cloud. UI tests can be written in C# and NUnit using Xamarin's UITest framework or in Ruby using Xamarin's Calabash framework. For the purposes of this book, we will only focus on using the C# approach using Xamarin.UITest.
The Xamarin UITest framework
The UITest framework enables you to automate interactions with an app using C# and the NUnit testing suite. All interactions take place through an instance of IApp
. The ConfigureApp...