# A View-by-View Strategy for Snapshot Testing on Android

DevFeed: [A View-by-View Strategy for Snapshot Testing on Android](<https://devfeed.tech/articles/the-secrets-of-effectively-snapshot-testing-on-android-25692.md>)

Original publisher: [Read original article](<https://sergiosastre.hashnode.dev/the-secrets-of-effectively-snapshot-testing-on-android>)

Author: Sergio Sastre Florez

Published: 2021-09-23T20:22:08Z

Content type: tutorial

Language: en

Sources: [Sergio's little tech corner](<https://devfeed.tech/sources/sergio-s-little-tech-corner.md>)

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [recyclerview](<https://devfeed.tech/tags/recyclerview.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 presents a view-by-view strategy for snapshot testing Android UI components. It explains why testing individual views can reduce synchronization work, simplify screen-state selection, and make flaky tests easier to diagnose, using a RecyclerView as an example.

## Source excerpt

When one gets started with snapshot testing, there are not enough resources to learn from. It's no surprise to end up with snapshot tests causing a lot of headaches rather than helping improve the quality of our app. One should not snapshot test with...