https://github.com/usefulness/screenshot-tests-for-android
Generate fast deterministic screenshots during Android instrumentation tests
https://github.com/usefulness/screenshot-tests-for-android
android gradle screenshot-testing screenshot-tests screenshots
Last synced: 2 months ago
JSON representation
Generate fast deterministic screenshots during Android instrumentation tests
- Host: GitHub
- URL: https://github.com/usefulness/screenshot-tests-for-android
- Owner: usefulness
- License: apache-2.0
- Created: 2022-08-06T07:31:15.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-18T00:28:16.000Z (over 2 years ago)
- Last Synced: 2024-04-18T06:57:32.028Z (over 2 years ago)
- Topics: android, gradle, screenshot-testing, screenshot-tests, screenshots
- Language: Java
- Homepage:
- Size: 2.89 MB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Screenshot Tests for Android
[](https://plugins.gradle.org/search?term="io.github.usefulness")

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