An Introduction to UI Testing for Uno Platform Applications

Introduction This step-by-step tutorial will take you through setting up your first unit test with Visual Studio and Uno Platform. If you are new to Uno Platform, it allows for creation of pixel-perfect, single-source C# and XAML apps which run natively on Windows, iOS, Android, macOS, Linux and Web via WebAssembly. Uno Platform is free and Open Source (Apache 2.0) and available on GitHub. Why Unit Test? Performing unit tests is a good practice for developers. Running unit tests is important for good quality and maintainable code. A unit test helps find errors in your code in a very easy manner. Unit testing helps reduce the cost of bug fixes. Prerequisites Visual Studio with Uno Platform Create a New Uno Project Open Visual Studio and click on Create new project. Search for the Uno templates, select the Cross-Platform App (Uno Platform) then click Next. Name your app. You probably want your project and solution to use the same name as your app. Put it on your preferred location for projects and click “Create”. Uno.UITest for Uno Platform The testing is available through: Selenium for WebAssembly apps, using Chrome Xamarin.UITest and AppCenter for iOS and Android apps. Note: The following target