# googlesamples/android-testing-templates

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/googlesamples-android-testing-templates).**

1,955 stars · 300 forks · Java · Apache-2.0 · archived

## Links

- GitHub: https://github.com/googlesamples/android-testing-templates
- awesome-repositories: https://awesome-repositories.com/repository/googlesamples-android-testing-templates.md

## Description

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, automating user interface events, and inspecting embedded web content. Furthermore, it includes configurations for verifying application stability when running against production-ready, minified code.

The suite supports a broad range of testing capabilities, including the ability to inject runtime arguments for dynamic test execution and the generation of coverage reports to identify untested code paths. These tools are designed to ensure consistent software behavior and reliability throughout the development lifecycle.

## Tags

### Development Tools & Productivity

- [Automated Test Execution](https://awesome-repositories.com/f/development-tools-productivity/debugging-profiling-testing/test-execution-management/automated-test-execution.md) — Executes automated interface and integration tests on physical devices or emulators to validate complex workflows. ([source](https://github.com/googlesamples/android-testing-templates/tree/master/AndroidTestingBlueprint))
- [Webview Automation](https://awesome-repositories.com/f/development-tools-productivity/webview-automation.md) — Enables programmatic control and inspection of embedded web content via standard automation protocols.

### Mobile Development

- [Android Automation Frameworks](https://awesome-repositories.com/f/mobile-development/automation-qa/android-automation-frameworks.md) — Provides frameworks for simulating user interactions and verifying interface states on Android devices.
- [Intent Stubbing](https://awesome-repositories.com/f/mobile-development/intent-based-navigation/intent-stubbing.md) — Intercepts and stubs inter-process communication to validate navigation flows without launching external components.
- [Intent Verification Testing](https://awesome-repositories.com/f/mobile-development/intent-based-navigation/intent-verification-testing.md) — Provides mechanisms to intercept and validate inter-app communication via intent stubbing during automated testing. ([source](https://github.com/googlesamples/android-testing-templates/tree/master/AndroidTestingBlueprint))
- [Inter-App Communication](https://awesome-repositories.com/f/mobile-development/inter-app-communication.md) — Implements strategies for validating bidirectional data exchange and navigation between distinct mobile applications. ([source](https://github.com/googlesamples/android-testing-templates/tree/master/AndroidTestingBlueprint-kotlinApp))

### Operating Systems & Systems Programming

- [Android Instrumentation](https://awesome-repositories.com/f/operating-systems-systems-programming/system-instrumentation-frameworks/android-instrumentation.md) — Uses native instrumentation to inject events and inspect application state for automated UI and integration testing.

### Testing & Quality Assurance

- [UI Automation](https://awesome-repositories.com/f/testing-quality-assurance/automation-interaction-tools/ui-automation.md) — Simulates user actions and verifies interface state changes to ensure reliable automated UI testing. ([source](https://github.com/googlesamples/android-testing-templates/tree/master/AndroidTestingBlueprint))
- [Test Execution Controls](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-utilities-assertions/test-lifecycle-execution-control/test-execution-controls.md) — Executes tests within the application process on-device to enable direct access to internal state and UI controls.
- [Integration Testing Workflows](https://awesome-repositories.com/f/testing-quality-assurance/integration-testing-workflows.md) — Provides workflows for validating communication between application components and external services.
- [Unit Testing](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/unit/unit-testing.md) — Executes local code tests to verify business logic and individual components in isolation.
- [JVM-Based Android Testing Patterns](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/unit/unit-testing/jvm-based-android-testing-patterns.md) — Provides structural patterns to isolate Android components for unit testing on a standard Java Virtual Machine.
- [Unit Testing Frameworks](https://awesome-repositories.com/f/testing-quality-assurance/unit-testing-frameworks.md) — Runs local unit tests on the development machine to verify business logic without hardware dependencies. ([source](https://github.com/googlesamples/android-testing-templates/tree/master/AndroidTestingBlueprint))
- [Testing Samples](https://awesome-repositories.com/f/testing-quality-assurance/android-ui-testing/testing-samples.md) — Offers a collection of sample implementations for standard Android testing libraries and frameworks.
- [Test Automation Tools](https://awesome-repositories.com/f/testing-quality-assurance/automation-interaction-tools/test-automation-tools.md) — Provides reference implementations and patterns for integrating automated testing tools into mobile applications. ([source](https://github.com/googlesamples/android-testing-templates#readme))
- [Code Coverage Analysis](https://awesome-repositories.com/f/testing-quality-assurance/code-coverage-analysis.md) — Offers tools and metrics to measure the extent of source code execution by test suites.
- [Minified Build Configurations](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-utilities-assertions/test-lifecycle-execution-control/testing-configurations/minified-build-configurations.md) — Configures build-time minification and shrinking rules to ensure application stability in production-ready test environments. ([source](https://github.com/googlesamples/android-testing-templates/tree/master/AndroidTestingBlueprint-kotlinApp))
- [Mobile Application Testing](https://awesome-repositories.com/f/testing-quality-assurance/mobile-application-testing.md) — Documents best practices for verifying business logic, inter-app communication, and web component behavior.
- [Black Box Testing](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/black-box-testing.md) — Performs black-box testing of cross-app and system-level interactions without relying on internal implementation details. ([source](https://github.com/googlesamples/android-testing-templates/tree/master/AndroidTestingBlueprint-kotlinApp))
- [Code Coverage Reportings](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/test-execution-orchestration/code-coverage-reportings.md) — Analyzes source code execution during testing to generate comprehensive coverage reports. ([source](https://github.com/googlesamples/android-testing-templates/tree/master/AndroidTestingBlueprint))
- [Web Testing Frameworks](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/test-frameworks/browser-and-ui-testing/browser-automation-frameworks/web-testing-frameworks.md) — Inspects and controls embedded web components using standard automation protocols to ensure functional consistency. ([source](https://github.com/googlesamples/android-testing-templates/tree/master/AndroidTestingBlueprint))
- [Component Testing Frameworks](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/test-frameworks/test-levels-and-types/component-testing-frameworks.md) — Integrates standard testing frameworks to verify application behavior across components and user scenarios. ([source](https://github.com/googlesamples/android-testing-templates#readme))
- [Minification Verification](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/unit/unit-testing/android-environment-testing/minification-verification.md) — Verifies application stability by running tests against production-ready, minified code.

### Part of an Awesome List

- [Android Instrumentation Tools](https://awesome-repositories.com/f/awesome-lists/devtools/android-instrumentation-tools.md) — Provides a suite of tools for hooking and dynamic analysis to facilitate automated interface testing.

### Programming Languages & Runtimes

- [JVM-Based Runtime Executions](https://awesome-repositories.com/f/programming-languages-runtimes/jvm-based-runtime-executions.md) — Executes business logic on the development machine using a standard virtual machine for fast, hardware-independent feedback.

### Software Engineering & Architecture

- [Synchronous Event Dispatch Loops](https://awesome-repositories.com/f/software-engineering-architecture/synchronous-event-dispatch-loops.md) — Synchronizes test execution with the UI event loop to prevent race conditions during automated interactions.
