Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Screenshot testing library for Android
| Date | Stars |
|---|---|
| 2026-07-24 | 1205 |
| 2026-07-25 | 1205 |
| 2026-07-28 | 1205 |
| 2026-07-30 | 1205 |
| 2026-08-06 | 1205 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# ![Karumi logo][karumilogo]Shot 
🔝 Top sponsors 🔝
[](https://www.emergetools.com)
Shot is an Android project you can use to write screenshot for your apps in a simple and friendly way.
## What is this?
``Shot`` is a Gradle plugin and a core android library thought to run screenshot tests for Android. This project provides a handy interface named ``ScreenshotTest`` and a ready to use ``ShotTestRunner`` you can use in order to write tests like these:
```kotlin
class GreetingScreenshotTest : ScreenshotTest {
// If you are using regular Android views
@Test
fun theActivityIsShownProperly() {
val mainActivity = startMainActivity()
compareScreenshot(activity)
}
// If you are using Jetpack Compose
@Test
fun rendersGreetingMessageForTheSpecifiedPerson() {
composeRule.setContent { Greeting(greeting) }
compareScreenshot(composeRule)
}
}
```
**Since Shot 5.0.0 we provide screenshot testing support for [Jetpack Compose](https://developer.android.com/jetpack/compose).** If you are testing your components using Shot we strongly recommend you to configure your emulator using the gpu mode ``swiftshader_indirect``. This will help you to avoid rendering issues when verifying your screenshots from any CI environment.


Record your screenshots executing ``./gradlew executeScreenshotTests -Precord``

And verify your tests executing ``./gradlew executeScreenshotTests``

If Shot finds any error in your tests execution the Gradle plugin will show a report as follows:

You can find the complete Facebook SDK documentation [here](https://facebook.github.io/screenshot-tests-for-android/).
## Getting started
Setup the Gradle plugin:
Modify your root ``build.gradle`` file:
```groovy
buildscript {
// ...
dependencies {
// ...
classpath 'com.karumi:shot:<LATEST_RELEASE>'
}
}
```
Apply the plugin from any of the modules configured in your project. In a simple Android app your ``app/build.gradle`` file:
```groovy
apply plugin: 'shot'
```
You will also have to configure the instrumentation test runner in your module ``build.gradle`` file as follows:
```groovy
android {
// ...
defaultConfig {
// ...
testInstrumentationRunner "com.karumi.shot.ShotTestRunner"
}
// ...
```
We created this test runner for you extending from the Android one.
This plugin sets up a few convenience commands you can list executing ``./gradlew tasks`` and reviewing the ``Shot`` associated tasks:

**If you are using flavors the available Shot gradle tasks will be configured based on your flavors and build types configuration.** You can find all the available shot tasks by executing ``./gradlew tasks``. For example, if your app has two flavors: ``green`` and ``blue`` the list of available Shot tasks will be:
```groovy
executeScreenshotTests - Checks the user interface screenshot tests. If you execute this task using -Precord param the screenshot will be regenerated.
blueDebugDownloadScreenshots - Retrieves the screenshots stored into the Android device where the tests were executed for the build BlueDebug
blueDebugExecuteScreenshotTests - Records the user interface tests screenshots. If you execute this task using -Precord param the screenshot will be regenerated for the build BlueDebug
blueDebugRemoveScreenshotsBefore - Removes the screenshots recorded before the tests execution from the Android device where the tests were executed for the build BlueDebug
blueDebugRemoveScreenshotsAfter - ReExcerpt of 22,857 characters
Read on GitHub249
11
7
Sergio Gutiérrez · Antropia Studio · Spain
6
5
3
3
3
2
2
2
2
Olmo Gallegos · Domestika
2
1
1
1
1
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:441631488ef58adf, topic:testing