screenshot-tests-for-android
screenshot-tests-for-android copied to clipboard
referenceDir does not work
I have simple code
referenceDir = "$projectDir/screenshot_tests"
multipleDevices true
}
referenceDir parameter is always ignored - no matter what I write inside it - screenshots are saved to $projectDir/screenshots folder. Removing multipleDevices does not affect it too.
I already tried to invalidate caches, removing .idea & .gradle folders, reimporting project - still does not work.
P.S versions: gradle 5.6.4 com.facebook.testing.screenshot:layout-hierarchy-common:0.10.0' com.facebook.testing.screenshot:plugin:0.10.0
+1
+1
+1
Is there any update on this issue? Have been facing this since long time.
I think you guys misunderstood purpose of referenceDir
. Considering "screenshots saved" comment in the original post, I believe the intent was to use recordDir
(to keep baseline screenshots). That certainly works. You may also need to add failureDir
- to see diff images of failed test cases.
Here is an example:
screenshots {
failureDir = "$projectDir/build/reports/failshots"
recordDir = "$projectDir/src/androidTest/snapshots"
multipleDevices = true
}