build.gradle
plugins {
id("io.github.usefulness.screenshot-testing-plugin") version "{{ version }}"
}
androidTest/kotlin/SampleTest.kt
class SampleTest {
@Test
fun foo() {
launchActivity<MainActivity>().onActivity(Screenshot::snap)
}
}
- run
./gradlew recordDebugAndroidTestScreenshotTest
- modify the view, run
./gradlew verifyDebugAndroidTestScreenshotTest
observe failure with a report
screenshot-tests-for-android is Apache-2-licensed.