Review changes made to an image. This action will compare the current image with the saved one, generating a comparison image labeled as [original]_compare.png. It also produces a JSON file containing the diff information, which can be found under build/test-results/roborazzi.
./gradlew verifyRoborazziDebug
./gradlew testDebugUnitTest after adding roborazzi.test.verify=true to your gradle.properties file.
This task will first verify the images and, if differences are detected, it will record a new baseline.
./gradlew clearRoborazziDebug
This is not a test task.
Note: This is an experimental task. This task will clear the saved images. This task also deletes the cached images. Please be careful when using this task.
The comparison image, saved as [original]_compare.png, is shown below:
You can check the test report in build/reports/roborazzi/index.html
Roborazzi uses module/build/outputs/roborazzi as the default directory for reference images and comparison images. You can customize these paths in your build.gradle file:
roborazzi {
// Directory for reference images
outputDir.set(file("src/screenshots"))
// Directory for comparison images (Experimental option)
compare {
outputDir.set(file("build/outputs/screenshots_comparison"))
}
}