Overview

A set of TestRules, ActivityScenarios and utils to facilitate UI & screenshot testing under certain configurations, independent of the UI testing libraries you are using. For screenshot testing, it supports:

This library enables you to easily change the following configurations in your UI tests:

  1. Locale (also Pseudolocales en_XA & ar_XB)

    1. App Locale (i.e. per-app language preference)

    2. System Locale

  2. Font size

  3. Orientation

  4. Custom themes

  5. Dark mode / Day-Night mode

  6. Display size

Wondering why verifying our design under these configurations is important? I've got you covered:

🎨 Design a pixel perfect Android app

Sponsors

Thanks to Screenshotbot for their support!

By using Screenshotbot instead of the in-build record/verify modes provided by most screenshot libraries, you'll give your colleagues a better developer experience, since they will not be required to manually record screenshots after every run, instead getting notifications on their Pull Requests.

Reading on screenshot testing

Code attributions

This library has been possible due to the work others have done previously. Most TestRules are based on code written by others:

Moreover, to enable cross-library screenshot tests this library uses the following screenshot testing libraries under the hood:

Contributing

  1. Create an issue in this repo

  2. In that repo, add an example and test where the bug is reproducible/ and showcasing the new feature.

  3. Once pushed, add a link to the PR in the issue created in this repo and add @sergio-sastre as a reviewer.

  4. Once reviewed and approved, create an issue in this repo.

  5. Fork this repo and add the approved code from the other repo to this one (no example or test needed). Add @sergio-sastre as a reviewer.

  6. Once approved, I will merge the code in both repos, and you will be added as a contributor to Android UI testing utils as well as Android screenshot testing playground.

I'll try to make the process easier in the future if I see many issues/feature requests incoming.

Android UI testing utils logo modified from one by Freepik - Flaticon

Last updated