Comments (3)
I'm getting the same issue on Windows 11 when running on an emulator.
Stacktrace below:
* What went wrong:
Execution failed for task ':app:debugExecuteScreenshotTests'.
> java.io.IOException: Unable to delete file: C:\Users\lucia\Documents\duco-installer-android\app\screenshots\debug\screenshots-default\metadata_compose.json_emulator-5554
The test still runs (and passes) though:
> Task :app:debugExecuteScreenshotTests FAILED
? Comparing screenshots with previous ones.
? Yeah!!! Your tests are passing.
Command run:
gradlew clean executeScreenshotTests
When trying to delete the file manually it was in use by "OpenJDK Platform binary" task.
After force closing the task and deleting it, the task runs without issue for the first time, but on a second run fails with the same problem.
from shot.
Hi @lichterschalter thanks for sending us such a detailed issue. I'm afraid I'd need to make some questions before even thinking in a fix for this issue. Did you check if the metadata file mentioned in the exception exist? Did you check the metadata file permission? Related to this sentence I can not delete the file metadata.xml manually when AndroidStudio is open
, could you please clean the project using the commeand ./gradlew clean
and then run the tests again using the command ./gradlew executeScreenshotTests -Precord
from your terminal? Thank you so much in advance
from shot.
Still happening on Windows 10.
As mentionned in the comment above, after killing the OpenJDK process, we can manually delete the file.
The issue is that when the verification test are failing, the html report isn't generated.
@pedrovgs would it be ok for you if we
- wrap the delete in a
try/catch
block to not crash if it can't be deleted? It's not ideal, but not really an issue with an appropriate gitignore rule. - make the meta filename unique by adding a timestamp or something to prevent the next run to crash because the file already exists.
The easiest way would be to add a uid: String
parameter in ShotFolder
class, and use this uid
as prefix/suffix of the folders.
I can work on the PR if you want
from shot.
Related Issues (20)
- Aggregate all modules report together to a root report
- "Unresolved reference: shot" HOT 6
- `ManagedVirtualDevice` support HOT 2
- Snapshot on multipe devices only saving last screenshot HOT 1
- How to compare screens with dynamic content
- Screenshots get deleted after being recorded.
- XML report not showing failing tests HOT 1
- Failed to grant permissions HOT 2
- Waiting for remote image fetch HOT 1
- Generated diff image does not show all differences
- Removing the Toolbar shadow (elevation) HOT 1
- Is it possble to test screenshots for gif animated image?
- Feature Request / Question - Record Screenshots at Runtime HOT 2
- Failing to record screenshots HOT 8
- compareScreenshot to capture and verify full screen
- Support for Java 17 and AGP 8.0 HOT 1
- Failing landscape tests due to screen dimensions HOT 1
- Plugin not found issue with new plugin configuration method in gradle HOT 3
- Upgrade Scrimage to latest version
- Please consider transferring ownership to the community HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shot.