Before you begin

This is a testing class which supports both Xamarin.iOS and Xamarin.Android. To complete the coding exercises, you will need a Xamarin development environment with a simulator or emulator to run the exercise on. Please read the setup requirements if you need help installing the Xamarin development environment.

Overview

In this class, you will create acceptance tests with Xamarin.UITest and learn best practices on sharing tests between platforms.

Objectives

  1. Create a Xamarin.UITest project
  2. Create a cross-platform UI Test

Lecture

XTC102 - Working with Xamarin.UITest.

Exercises

Exercise materials are available from GitHub. The code can be cloned through a desktop Git client or downloaded directly as a ZIP file.

  1. Create a UI Test Project
    Exercise
    In this exercise, we will create a new Xamarin.UITest project and explore the generated project.
  2. Create acceptance tests with Xamarin.UITest
    Exercise
    In this exercise, you will learn the fundamentals of how to create a Xamarin.UITest. You will explore how to how create queries that can analyze and perform actions on your application. You will also learn how to use the REPL tool that helps your workflow when executing tests.
  3. Create a cross-platform UITest #1
    Exercise
    In this exercise, you will isolate platform-specific queries to write UI tests which can be shared between the iOS and Android verssion of an application.
  4. Create a cross-platform UITest #2
    Exercise
    In this exercise, you will take a more substantial approach to building a cross-platform set of tests by not just isolating the queries but the actual operations on the screens for iOS and Android.
  5. Deploying Xamarin.UITests to a local device
    Exercise
    In this exercise, you will take a set of UI Tests and run them against an application installed on a local device.

Exploring On Your Own

Xamarin.UITest QuickStart Xamarin.UITest Cheat Sheet Xamarin.UITest - Automated Mobile Testing with C# and NUnit BDD Tests with Xamarin.UITest and SpecFlow Building a scalable test suite with Xamarin.UITest and Page Objects