This is a collection of sample projects that demonstrate how to write automated tests for Android applications. The samples cover a range of testing techniques, including simulating user interactions with the Espresso framework, verifying navigation and inter-component communication through intent interception, and managing activity, intent, and service lifecycles using reusable test rules.
The main features of android/testing-samples are: Android UI Testing, Testing Samples, Test Rule Wrappers, Android Intent Integrations, Intent Stubbing, Intent Verification Testing, Intent Interception for Testing, Espresso UI Testing.
Open-source alternatives to android/testing-samples include: googlesamples/android-testing-templates — This repository provides a collection of reference implementations and patterns for testing Android applications. It… facebook/screenshot-tests-for-android — This project is an automated testing framework designed to capture and verify the visual state of Android interface… openatx/uiautomator2 — uiautomator2 is an Android device automation tool and UI testing library. It functions as a framework for automating… robolectric/robolectric — Robolectric is a unit testing framework that runs Android tests directly inside the Java Virtual Machine, eliminating… google/earlgrey — EarlGrey is an iOS UI automation test framework that enables writing and running automated tests simulating real user… awaitility/awaitility — Awaitility is a Java asynchronous testing library and conditional polling framework. It provides a fluent…
This repository provides a collection of reference implementations and patterns for testing Android applications. It serves as a guide for developers to integrate standard testing libraries and frameworks into their projects, covering the full spectrum of verification from local business logic to complex interface interactions. The project distinguishes itself by demonstrating how to configure and execute tests across diverse environments, including local virtual machines and physical devices or emulators. It provides specific patterns for validating inter-application communication, automatin
uiautomator2 is an Android device automation tool and UI testing library. It functions as a framework for automating user interface interactions and managing device states via a remote client. The project provides a remote management interface for controlling Android applications, simulating user gestures, and managing system settings. It enables the analysis of XML UI hierarchies to locate interface elements and verify application behavior. The tool covers broad capability areas including application lifecycle management, device connectivity, and file system operations. It also includes sys
This project is an automated testing framework designed to capture and verify the visual state of Android interface components. It provides a system for generating deterministic snapshots of UI elements, allowing developers to establish baselines for layout consistency and detect unintended visual regressions across different software versions and hardware configurations. The framework distinguishes itself by enabling isolated component rendering, which allows individual views to be tested without requiring a full application build. It ensures consistency by controlling the rendering lifecycl
EarlGrey is an iOS UI automation test framework that enables writing and running automated tests simulating real user interactions. It provides a synchronized test execution engine that automatically waits for animations, network requests, and run-loop states to complete before performing test actions or assertions, producing stable and repeatable results across test runs. The framework distinguishes itself through out-of-process interaction handling, managing system alerts and app switching during tests, and a pixel-level visibility checker that verifies UI elements are actually visible and