# Android Testing

Published articles for Android Testing.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Why Visual Testing Is Critical for Mobile App Quality

DevFeed: [Why Visual Testing Is Critical for Mobile App Quality](<https://devfeed.tech/articles/why-visual-testing-is-critical-for-mobile-app-quality-24858.md>)

Original publisher: [Read original article](<https://alexzh.com/why-visual-testing-is-critical-for-mobile-app-quality/>)

Author: Alex Zhukovich

Published: 2025-03-13T20:59:10Z

Content type: tutorial

Language: en

Sources: [Alex Zhuk - Android development and testing](<https://devfeed.tech/sources/alex-zhuk-android-development-and-testing.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Android](<https://devfeed.tech/topics/android.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [app-quality](<https://devfeed.tech/tags/app-quality.md>), [devices](<https://devfeed.tech/tags/devices.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [screenshot](<https://devfeed.tech/tags/screenshot.md>), [screenshot-testing](<https://devfeed.tech/tags/screenshot-testing.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [themes](<https://devfeed.tech/tags/themes.md>), [ui](<https://devfeed.tech/tags/ui.md>), [visual-testing](<https://devfeed.tech/tags/visual-testing.md>)

### AI overview

The article explains that visual testing can detect UI imperfections that conventional UI tests may miss. It introduces screenshot comparison in Android, using baseline "golden screenshots" to identify alignment, color, layout, localization, and accessibility issues across devices and themes.

### Source excerpt

Visual tests catches UI imperfections that traditional UI tests miss. They detect misalignments, color issues, and layout problems across different devices and themes. This article introduces visual testing concepts, explains how screenshot comparison works, and demonstrates implementation.

## UI Testing Made Easy: The Robot Test Pattern on Android

DevFeed: [UI Testing Made Easy: The Robot Test Pattern on Android](<https://devfeed.tech/articles/ui-testing-made-easy-the-robot-test-pattern-on-android-25118.md>)

Original publisher: [Read original article](<http://michaelevans.org/blog/2024/12/14/ui-testing-made-easy-the-robot-test-pattern-on-android/>)

Author: Michael Evans

Published: 2024-12-14T15:52:24Z

Content type: article

Language: en

Sources: [Gadget Habit](<https://devfeed.tech/sources/gadget-habit.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Android](<https://devfeed.tech/topics/android.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [compose](<https://devfeed.tech/tags/compose.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [testing](<https://devfeed.tech/tags/testing.md>), [ui](<https://devfeed.tech/tags/ui.md>), [ui-testing](<https://devfeed.tech/tags/ui-testing.md>)

### AI overview

This guide explains the Robot Testing Pattern for Android UI testing. It describes how robots abstract UI interactions from test logic, improving readability, maintainability, reuse, organization, parallel execution, and stability. It also covers implementations for Jetpack Compose and traditional View-based applications, along with base robots and recommended practices.

### Source excerpt

As Android applications grow in complexity, maintaining a robust testing strategy becomes increasingly challenging. The "Robot Testing Pattern" offers a structured approach to UI testing that can significantly improve your test suite's maintainability and reliability. This guide is designed for Android developers who have basic experience with testing and want to enhance their testing methodology. Understanding the Robot Pattern The Robot Testing Pattern, also known as the Robot Framework or Robot Pattern, is a testing methodology that creates an abstraction layer between your test code and UI interactions. Think of robots as specialized assistants that handle all the UI interactions on behalf of your tests. Key Benefits The Robot Pattern provides several advantages that make it particularly valuable for Android testing: Improved Test Readability: Tests become high-level descriptions of user behavior rather than low-level UI interactions, making them easier to understand and maintain. Enhanced Maintainability: When UI changes occur, updates are needed only in the robot implementation rather than across multiple test files. Code Reusability: Common interactions can be shared across multiple test cases, reducing duplication and ensuring consistency. Better Test Organization: The pattern enforces a clear separation between test logic and UI interaction code. Simplified Parallel Testing: Isolated UI interaction logic enables efficient parallel test execution and better test stability. Implementation Guide Let's explore how to implement the Robot Pattern in both Jetpack Compose and traditional View-based applications. Jetpack Compose Implementation Here's a basic implementation for a login screen using Compose: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 class LoginRobot { private val composeTestRule = createComposeRule() fun enterUsername(username: String) = apply { composeTestRule.onNodeWithContentDescription("UsernameTextField") .performTextInput(us

## Demystifying Maestro's UI Testing Implementation

DevFeed: [Demystifying Maestro's UI Testing Implementation](<https://devfeed.tech/articles/demystifying-maestro-s-ui-testing-implementation-25128.md>)

Original publisher: [Read original article](<https://handstandsam.com/2024/11/18/demystifying-maestros-ui-testing-implementation/>)

Author: Sam Edwards

Published: 2024-11-18T13:59:04Z

Content type: article

Language: en

Sources: [Handstand Sam](<https://devfeed.tech/sources/handstand-sam.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [ui-testing](<https://devfeed.tech/topics/ui-testing.md>), [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>), [Git](<https://devfeed.tech/topics/git.md>)

Tags: [adb](<https://devfeed.tech/tags/adb.md>), [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [code](<https://devfeed.tech/tags/code.md>), [format](<https://devfeed.tech/tags/format.md>), [git](<https://devfeed.tech/tags/git.md>), [library](<https://devfeed.tech/tags/library.md>), [maestro](<https://devfeed.tech/tags/maestro.md>), [on-device](<https://devfeed.tech/tags/on-device.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [server](<https://devfeed.tech/tags/server.md>), [testing](<https://devfeed.tech/tags/testing.md>), [ui](<https://devfeed.tech/tags/ui.md>), [ui-testing](<https://devfeed.tech/tags/ui-testing.md>), [uiautomator](<https://devfeed.tech/tags/uiautomator.md>), [updates](<https://devfeed.tech/tags/updates.md>), [xml](<https://devfeed.tech/tags/xml.md>)

### AI overview

This technical post examines how Maestro implements UI testing. It describes its YAML-based test commands, CLI-installed APKs, an on-device Netty gRPC server, UiAutomator view-hierarchy access, XML serialization, and UI interactions.

### Source excerpt

I first heard about Maestro when it was released in 2022, but I haven't played with it until now. I'm doing some work with Espresso and UiAutomator for Android testing and was curious how Maestro worked under the hood, so I cloned their git repo and dove into the code. This quick post shares what [...]

## Types of UI Tests and What They Verify

DevFeed: [Types of UI Tests and What They Verify](<https://devfeed.tech/articles/not-all-ui-tests-are-the-same-24853.md>)

Original publisher: [Read original article](<https://alexzh.com/not-all-ui-tests-are-the-same/>)

Author: Alex Zhukovich

Published: 2023-11-17T00:11:25Z

Content type: tutorial

Language: en

Sources: [Alex Zhuk - Android development and testing](<https://devfeed.tech/sources/alex-zhuk-android-development-and-testing.md>)

Topics: [ui](<https://devfeed.tech/topics/ui.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Accessibility](<https://devfeed.tech/topics/accessibility.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [accessibility-testing](<https://devfeed.tech/tags/accessibility-testing.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [ui](<https://devfeed.tech/tags/ui.md>), [ui-testing](<https://devfeed.tech/tags/ui-testing.md>)

### AI overview

This tutorial explains several types of UI testing: end-to-end tests, UI tests with fake data, screenshot or pixel-perfection tests, and accessibility tests. It describes what each type can verify and introduces ways to begin UI testing in a project.

### Source excerpt

The article explores different types of UI testing, such as end-to-end testing, UI testing with fake data, pixel perfection testing, and accessibility testing. The article also includes information on how to get started with UI testing in any project.

## Our Android testing process

DevFeed: [Our Android testing process](<https://devfeed.tech/articles/our-android-testing-process-24579.md>)

Original publisher: [Read original article](<https://medium.com/headspace-engineering/our-android-testing-process-e055f1c7e15c?source=rss-3da90e297190------2>)

Author: Headspace

Published: 2022-06-22T05:16:52Z

Content type: article

Language: en

Sources: [Stories by Headspace on Medium](<https://devfeed.tech/sources/stories-by-headspace-on-medium.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Android](<https://devfeed.tech/topics/android.md>), [unit test](<https://devfeed.tech/topics/unit-test.md>), [Mocking](<https://devfeed.tech/topics/mocking.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [junit](<https://devfeed.tech/tags/junit.md>), [mental-health](<https://devfeed.tech/tags/mental-health.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [mobile-test-automation](<https://devfeed.tech/tags/mobile-test-automation.md>), [mocking](<https://devfeed.tech/tags/mocking.md>), [quality-assurance](<https://devfeed.tech/tags/quality-assurance.md>), [test-lab](<https://devfeed.tech/tags/test-lab.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

Headspace describes its Android testing strategy after rewriting its app, including unit-test coverage standards, selective end-to-end testing, mocking, dependency injection, Robolectric, and Firebase Test Lab.

### Source excerpt

Our testing strategy, how we integrate it into our development workflow, and what the future holds for testing at Headspace. By John Qualls, Senior Software Engineer, Greg Rami, Principal Software Engineer, and Anton Gerasimenko, Software Engineer Introduction When we took on the daunting task of rewriting our entire app at the end of 2019, one of our key focus areas was testability. At the time, we had less than 20% of our code covered by unit tests -- no integration or end-to-end (E2E) tests -- and adding any tests to the code base was a big effort. From the beginning, we agreed on the standard of at least 80% unit test coverage on all Pull Requests (PRs), E2E tests for critical flows, and an architecture that was focused on testability. The result is a more robust codebase. Today, we're able to capture critical bugs via our tests suite coverage before they hit our users and, very importantly, it's now trivial, and very fast, to add new tests. Let's detail our testing strategy, how we integrate it into our development workflow, and what the future holds for testing at Headspace. Testing Strategy Shortly after the rewrite, we had hundreds of unit tests and around twenty E2E tests. We wanted to optimize the number of E2E tests that we do to only certain use cases where it makes sense to take on the additional time and costs in exchange for the reduced risk. Test selection pyramid for cost and speedUnit Tests Our unit tests are straightforward. They test a very small unit of code by relying on JUnit 5 and different layers of mocking: MockK to mock all the dependencies that are unrelated to the current test. This is made easier by using good architecture principles such as Single Responsibility Principle (SRP) and Dependency Injection (DI) We introduced a Java Faker library, that provides "fakes" for primitive values that do not need to have a specific value Similarly, we have our own "model Fakers" that provide domain objects. That way when the underlying classes chang

## Android 11 tightens restrictions on CA certificates

DevFeed: [Android 11 tightens restrictions on CA certificates](<https://devfeed.tech/articles/android-11-tightens-restrictions-on-ca-certificates-19036.md>)

Original publisher: [Read original article](<https://httptoolkit.com/blog/android-11-trust-ca-certificates/>)

Author: HTTP Toolkit; Tim Perry

Published: 2020-09-10T16:30:00Z

Content type: article

Language: en

Sources: [HTTP Toolkit](<https://devfeed.tech/sources/http-toolkit.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Network](<https://devfeed.tech/topics/network.md>), [Reverse Engineering](<https://devfeed.tech/topics/reverse-engineering.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [certificates](<https://devfeed.tech/tags/certificates.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [interception](<https://devfeed.tech/tags/interception.md>), [network](<https://devfeed.tech/tags/network.md>), [reverse-engineering](<https://devfeed.tech/tags/reverse-engineering.md>), [tls](<https://devfeed.tech/tags/tls.md>)

### AI overview

This article explains how Android 11 further restricts the installation of Certificate Authority certificates. Apps, debugging tools, and user actions can no longer prompt installation into the user-managed certificate store; users must use a hidden settings page instead. The change affects legitimate Android testing, debugging, reverse engineering, and enterprise network configuration use cases.

### Source excerpt

Your trusted Certificate Authorities (CAs) are the organizations that you trust to guarantee the signatures of your encrypted traffic and content. That's a lot of power, and the list of trusted authorities is dangerous to mess around with. Nonetheless, it's also something that power users might want to configure, for Android testing, for app debugging, for reverse engineering or as part of some enterprise network configurations. Android has tightly restricted this power for a while, but in Android 11 (released this week) it locks down further, making it impossible for any app, debugging tool or user action to prompt to install a CA certificate, even to the untrusted-by-default user-managed certificate store. The only way to install any CA certificate now is by using a button hidden deep in the settings, on a page that apps cannot link to. To be clear, carefully managing the trusted CAs on Android devices is important! Adding a CA should not be easy to do by accident or unknowingly. Protecting users from themselves is absolutely necessary here, and it's a hard problem. That said, there are many legitimate use cases where you want to be able to choose which CAs you trust, and that just got much harder. There's a balance here to manage, and I'm not sure Android has made the right choice. Let's dig into the details: How did Android CA certificate management work until now? Until now, an app could ask a user to trust a CA certificate in the user certificate store (but not the system store), using the KeyChain.createInstallIntent() API method. Similarly, the operating system would offer to trust a CA certificate if one was manually opened on the device from the filesystem. These certificate trust prompts came with a variety of loud warnings & confirmations, and mandated setup of a device pin or other screen lock before you could complete them, if one wasn't already set. It wasn't possible to do accidentally, and it was hard to trick users into accepting these scary prompt

## Firebase Test Lab December 2017 Update

DevFeed: [Firebase Test Lab December 2017 Update](<https://devfeed.tech/articles/firebase-test-lab-december-2017-update-16242.md>)

Original publisher: [Read original article](<https://firebase.blog/posts/2017/12/firebase-test-lab-december-2017-update>)

Author: Doug Stevenson

Published: 2017-12-12T00:00:00Z

Content type: release

Language: en

Sources: [Firebase Blog](<https://devfeed.tech/sources/firebase-blog.md>)

Topics: [Firebase](<https://devfeed.tech/topics/firebase.md>), [Android](<https://devfeed.tech/topics/android.md>), [Test coverage](<https://devfeed.tech/topics/coverage.md>), [test-coverage](<https://devfeed.tech/topics/test-coverage.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Script](<https://devfeed.tech/topics/script.md>), [APK](<https://devfeed.tech/topics/apk.md>), [App](<https://devfeed.tech/topics/app.md>), [JSON](<https://devfeed.tech/topics/json.md>)

Tags: [2017](<https://devfeed.tech/tags/2017.md>), [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [apk](<https://devfeed.tech/tags/apk.md>), [devices](<https://devfeed.tech/tags/devices.md>), [espresso](<https://devfeed.tech/tags/espresso.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [huawei](<https://devfeed.tech/tags/huawei.md>), [json](<https://devfeed.tech/tags/json.md>), [news](<https://devfeed.tech/tags/news.md>), [screenshots](<https://devfeed.tech/tags/screenshots.md>), [test-coverage](<https://devfeed.tech/tags/test-coverage.md>), [test-lab](<https://devfeed.tech/tags/test-lab.md>), [testing](<https://devfeed.tech/tags/testing.md>), [update](<https://devfeed.tech/tags/update.md>)

### AI overview

Firebase Test Lab's December 2017 update introduces Robo scripts for guiding automated Android tests through specific actions and screens, clusters screenshots by display characteristics, and adds several test devices.

### Source excerpt

News, tutorials, and updates from the Firebase team.

## Setting up GitLab CI for Android Projects

DevFeed: [Setting up GitLab CI for Android Projects](<https://devfeed.tech/articles/setting-up-gitlab-ci-for-android-projects-25867.md>)

Original publisher: [Read original article](<http://lordraydenmk.github.io//2017/setting-up-gitlab-ci-for-android/>)

Author: Stojan Anastasov

Published: 2017-12-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [Stojan Anastasov's blog](<https://devfeed.tech/sources/stojan-anastasov-s-blog.md>)

Topics: [GitLab](<https://devfeed.tech/topics/gitlab.md>), [Android](<https://devfeed.tech/topics/android.md>), [ci](<https://devfeed.tech/topics/ci.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Testing](<https://devfeed.tech/topics/testing.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [continuous-integration](<https://devfeed.tech/tags/continuous-integration.md>), [gitlab](<https://devfeed.tech/tags/gitlab.md>), [gitlab-ci](<https://devfeed.tech/tags/gitlab-ci.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>)

### AI overview

A tutorial for configuring GitLab CI for Android projects. It explains installing Android command-line tools and SDK packages, transferring accepted licenses to a CI server, and handling emulator limitations when running functional tests.

### Source excerpt

My first experience with continuous integration was using Bitbucket in combination with Jenkins. I was pretty happy with my setup. Jenkins would run on every commit making sure my code compiles, run android lint and run my unit tests. I also set up continuous deployment using Fabric. Now, at work, we use GitLab as a code repository. GitLab also offers continuous integration. When we decided to start using continuous integration at work we decided to give GitLab a chance. It was already integrated with GitLab and to use it we just needed to install a runner. Using CI with GitLab is simple, after you install a runner you need to add a .gitlab-ci.yml file at the root of the repository. GitLab even offers template .gitlab-ci.yml files for various languages and frameworks. The android template is based on this blog post from 2016. It is a great guide but unfortunately today it doesn't work. Google introduced a few changes in the command line tools. Installing Android SDK To install the Android SDK on a CI we need to install the command line tools (scroll to the bottom to Get just the command line tools). The command line tools include the sdkmanager - a command line tool that allows you to view, install, update, and uninstall packages for the Android SDK. So instead of - wget --quiet --output-document=android-sdk.tgz https://dl.google.com/android/android-sdk_r${ANDROID_SDK_TOOLS}-linux.tgz - tar --extract --gzip --file=android-sdk.tgz we can use - wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip - unzip -q android-sdk.zip -d android-sdk-linux to download and install the Android SDK tools. There is also an improvement in accepting licenses for the Android SDK. After you accept the licenses on your development machine the tools will generate a licenses folder in the Android SDK root directory. You can transfer the licenses from your development machine to your CI server. To accept the licenses we can use: -

## Firebase Test Lab October 2017 Update

DevFeed: [Firebase Test Lab October 2017 Update](<https://devfeed.tech/articles/firebase-test-lab-october-2017-update-16231.md>)

Original publisher: [Read original article](<https://firebase.blog/posts/2017/10/firebase-test-lab-october-2017-update>)

Author: Doug Stevenson

Published: 2017-10-12T00:00:00Z

Content type: news

Language: en

Sources: [Firebase Blog](<https://devfeed.tech/sources/firebase-blog.md>)

Topics: [Firebase](<https://devfeed.tech/topics/firebase.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Android](<https://devfeed.tech/topics/android.md>), [APK](<https://devfeed.tech/topics/apk.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [2017](<https://devfeed.tech/tags/2017.md>), [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [apk](<https://devfeed.tech/tags/apk.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [launch](<https://devfeed.tech/tags/launch.md>), [news](<https://devfeed.tech/tags/news.md>), [test-lab](<https://devfeed.tech/tags/test-lab.md>), [testing](<https://devfeed.tech/tags/testing.md>), [updates](<https://devfeed.tech/tags/updates.md>)

### AI overview

Firebase Test Lab's October 2017 update describes improved Robo test coverage and crash detection, faster results when some collected data is disabled, and support for Android Test Orchestrator.

### Source excerpt

News, tutorials, and updates from the Firebase team.

## Android Testing with Mockito

DevFeed: [Android Testing with Mockito](<https://devfeed.tech/articles/testing-made-sweet-with-a-mockito-28647.md>)

Original publisher: [Read original article](<https://jeroenmols.com/blog/2016/06/24/droidcondetalk/>)

Author: info@jeroenmols.com (Jeroen Mols)

Published: 2016-06-24T00:00:00Z

Content type: article

Language: en

Sources: [Jeroen Mols](<https://devfeed.tech/sources/jeroen-mols.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Android](<https://devfeed.tech/topics/android.md>), [unit tests](<https://devfeed.tech/topics/unit-tests.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [blogs](<https://devfeed.tech/tags/blogs.md>), [code-coverage](<https://devfeed.tech/tags/code-coverage.md>), [droidcon](<https://devfeed.tech/tags/droidcon.md>), [mockito](<https://devfeed.tech/tags/mockito.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [tdd](<https://devfeed.tech/tags/tdd.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

### AI overview

This article recaps a Droidcon Berlin 2016 talk about Android testing with Mockito. It explains mocks, stubs, testing Android code and final methods, and using relevant test data, with sample code available on GitHub.

### Source excerpt

At Droidcon Berlin 2016 I had a great time talking about testing using the Mockito framework. While the talk wasn't recorded unfortunately, the great folks at Voice Republic recorded an audio version which you can listen to as a podcast or together with the slides.

## Android Testing: A Rough Guide

DevFeed: [Android Testing: A Rough Guide](<https://devfeed.tech/articles/android-testing-a-rough-guide-26040.md>)

Original publisher: [Read original article](<http://doridori.github.io//android_testing_a_rough_guide/>)

Author: SystemDotRun

Published: 2015-02-27T00:00:00Z

Content type: article

Language: en

Sources: [SystemDotRun](<https://devfeed.tech/sources/systemdotrun.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Development](<https://devfeed.tech/topics/development.md>), [Tooling](<https://devfeed.tech/topics/tooling.md>), [APK](<https://devfeed.tech/topics/apk.md>), [Emulator](<https://devfeed.tech/topics/emulator.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [apk](<https://devfeed.tech/tags/apk.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [automated](<https://devfeed.tech/tags/automated.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [guide](<https://devfeed.tech/tags/guide.md>), [junit](<https://devfeed.tech/tags/junit.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [tdd](<https://devfeed.tech/tags/tdd.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

A rough guide to the author's approaches to automated testing on Android, covering testing strategies, TDD, test tooling, device and emulator tests, test APKs, JUnit 4, and JVM tests. The article argues that writing tests encourages developers to think about software architecture.

### Source excerpt

Do you have a go-to approach when writing automated tests on Android? Every project I work on has a different testing strategy, and each time I learn something new along the way. This post is a rough outline of my approaches to automated testing on Android (including past, present & future). The post serves 3 purposes: Writing stuff down always helps me think about what Im actually doing and if it makes sense. For others who have less experience writing tests; this will hopefully offer some ideas of paths to explore. For others with more experience; you can give me some hints of what I'm missing! Im not going to talk much (or at all) about how you use the tools, otherwise this post would be huge. This is more on a jumping off point for further exploration :) It there is something you want more info on, investigate it, write a post about it, and I can link to it here! Why test? Automated testing and TDD is one of those things in software development that some love and some hate (actually, what isn't like that in dev?!). Regardless of what side of the fence your on there is one thing thats hard to argue against, writing tests forces you to think about your software architecture. I think actually this is main thing I like about it, but probably not its biggest advantage. Testing on Android In the past I have felt like we were short-changed in the Android world when it comes to testing, compared to other languages or frameworks that have been designed from the start to ease the path of testing (i.e. RoR). But the tools are improving all the time which is fantastic. Edit: After starting this I listened to Episode 1 of the new Fragmented podcast, which is interesting as they echo my thoughts here exactly! Tooling Test Frameworks There are a number of ways to run your tests, the simplest first choice to me seems to run them on a device or emulator via a test apk (see below for emulator choices) rather than using something like Roboelectic (which lots of people do like and

## Better Android Testing with Robolectric 2.0

DevFeed: [Better Android Testing with Robolectric 2.0](<https://devfeed.tech/articles/better-android-testing-with-robolectric-2-0-15544.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/better-android-testing-with-robolectric-2-0>)

Author: Square Engineering

Published: 2013-05-09T16:03:00Z

Content type: article

Language: en

Sources: [Square Corner Blog RSS Feed](<https://devfeed.tech/sources/square-corner-blog-rss-feed.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Android](<https://devfeed.tech/topics/android.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [Mocking](<https://devfeed.tech/topics/mocking.md>), [Instrumentation](<https://devfeed.tech/topics/instrumentation.md>), [ide](<https://devfeed.tech/topics/ide.md>), [releases](<https://devfeed.tech/topics/releases.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [announce](<https://devfeed.tech/tags/announce.md>), [availability](<https://devfeed.tech/tags/availability.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [framework](<https://devfeed.tech/tags/framework.md>), [ide](<https://devfeed.tech/tags/ide.md>), [instrumentation](<https://devfeed.tech/tags/instrumentation.md>), [mocking](<https://devfeed.tech/tags/mocking.md>), [robolectric](<https://devfeed.tech/tags/robolectric.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

This article announces Robolectric 2.0 release candidate 1 and explains how the framework supports Android unit testing on a desktop JVM. It describes improved Android OS emulation using modified Android SDK code, support for styles, themes, and system resources, faster test startup, and bug fixes.

### Source excerpt

The essential framework for testing Android applications

## Basic Android Testing - Touchlab

DevFeed: [Basic Android Testing - Touchlab](<https://devfeed.tech/articles/basic-android-testing-touchlab-38056.md>)

Original publisher: [Read original article](<https://touchlab.co/2012-07-basic-android-testing>)

Published: 2012-07-05T16:58:00Z

Content type: tutorial

Language: en

Sources: [Touchlab | Enterprise Mobile Innovation & Development](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Android Testing](<https://devfeed.tech/topics/android-testing.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [SDK](<https://devfeed.tech/topics/sdk.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [crashes](<https://devfeed.tech/tags/crashes.md>), [logging](<https://devfeed.tech/tags/logging.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [thoughts](<https://devfeed.tech/tags/thoughts.md>)

### AI overview

A practical guide to basic Android testing explains how to collect useful information for developers, including Logcat logs, screenshots, reproduction details, and crash information. It distinguishes uncaught exceptions from Application Not Responding events and notes the role of the main thread in ANRs.

### Source excerpt

I wouldn't really call this a "blog post" as much as a quick set of instructions for basic android testing. I need to share them with somebody.