Shot: Running tests from windows throws ``org.apache.commons.io.FileExistsException``
Expected behaviour
executeScreenshotTests -Precord and executeScreenshotTests should not throw FileExistsException
Actual behaviour
Running command executeScreenshotTests -Precord is returning
org.apache.commons.io.FileExistsException: Destination '{myProjectPath}\features\{myFeature}\screenshots\debug\screenshots-compose-default\{packageName}testName.png already exists.
Running command executeScreenshotTests is returning
org.apache.commons.io.FileExistsException: Destination '{myProjectPath}\features\{myFeature}\screenshots\debug\screenshots-compose-default\metadata.json_emulator-5554 already exists.
NOTE: I deleted the screenshots directory from my module before running these commands. After these commands run and finish I see the .png, metadata.json-5554 and sometimes the metadata.json files in that directory.
Steps to reproduce
Create a test using compose-ui and run the commands:
gradlew.bat executeScreenshotTests -Precord
gradlew.bat executeScreenshotTests
Version of the library
5.11.0 Also I am using a machine with Windows 10 installed and Android Studio Arctic Fox 2020.3.1 RC1
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 35 (21 by maintainers)
@zoey-juan Log is from 5.12.2 probably, because in PR #273 don’t use xml parser. Probably during trying code from PR in your test project mavenLocal() repository was not defined before remote repository and 5.12.2 with old code was used. I think you can try 5.13.0 from remote maven repository.
@pedrovgs I don’t remember to have this issue during fixing issue #140, but i will try to have a look this week.
Merged and released, thank you so much @mariuszmarzec 😃 Could you please guys check if 5.12.2 is working as expected, at least on API 28?
@pedrovgs I created a PR and after those changes @rock3r 's Bundel screenshot testing is working for me.