Home

Awesome

Page object pattern sample

This project demonstrates the page object pattern (POP) that we use internally here at Xamarin. We have tried both simpler and more complex architectures in the past and have found this approach to be one of the best. It is easily adopted by people who are learning how to write tests, but also provides the scalability needed to build out larger, more complicated test suites.

This project is based on the Tasky Pro Calabash example and uses many of the same concepts as Calabash's page object pattern.

Want more information?

Read the wiki

Running these tests on your computer

  1. Clone this repo
  2. Build
  3. Run*

*If you want to run this on a physical iOS device, you will need to clone and build the app from source in order to get an IPA file that is compatible with your device.

POP Implementation

  1. Create a new test project or open up your existing one

  2. Install the Xamarin.UITest.POP NuGet package, which will add all the necessary files to your project

    Alternatively, you can manually add the following files to your project (making sure to change the namespaces to match your own):

  3. Remove AppInitializer.cs (if it exists)

  4. Ensure page object classes inherit from BasePage

  5. Ensure test fixture classes inherit from BaseTestFixture

For more detailed instructions check out the wiki.

Contributors