Code Monkey home page Code Monkey logo

Comments (3)

lucianoluzzi avatar lucianoluzzi commented on May 26, 2024 1

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.

pedrovgs avatar pedrovgs commented on May 26, 2024

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.

badoualy avatar badoualy commented on May 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.