# Write Once, Test Everywhere: Cross-Library Screenshot Testing with AndroidUiTestingUtils 2.0.0

DevFeed: [Write Once, Test Everywhere: Cross-Library Screenshot Testing with AndroidUiTestingUtils 2.0.0](<https://devfeed.tech/articles/write-once-test-everywhere-cross-library-screenshot-testing-with-androiduitestingutils-2-0-0-25695.md>)

Original publisher: [Read original article](<https://sergiosastre.hashnode.dev/write-once-test-everywhere-cross-library-screenshot-testing-with-androiduitestingutils>)

Author: Sergio Sastre Florez

Published: 2023-09-15T15:06:04Z

Content type: tutorial

Language: en

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

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [robolectric](<https://devfeed.tech/tags/robolectric.md>), [roborazzi](<https://devfeed.tech/tags/roborazzi.md>), [screenshot-testing](<https://devfeed.tech/tags/screenshot-testing.md>), [testing](<https://devfeed.tech/tags/testing.md>), [ui-testing](<https://devfeed.tech/tags/ui-testing.md>)

## AI overview

This tutorial explains how AndroidUiTestingUtils 2.0.0 supports cross-library screenshot tests. It describes a common interface for device configuration, the subject under test, and screenshot recording or verification, with separate modules for Paparazzi, Dropshots, Roborazzi, and Shot. It also discusses enabling Robolectric Native Graphics mode through Gradle.

## Source excerpt

As observed in the previous blog post of this series, screenshot tests have a lot in common regardless of the library they're written with, namely: Setting the device configuration (e.g. Locale, Ui Mode, Font scale...) Setting the Subject Under Tes...