-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileNotFoundException for metdata.xml file while running a particular case #55
Comments
I think I had this very same problem when the emulator didn't have write permissions for the sdcard or there was a major problem running tests (some sort of crash). Try deleting and creating the emulator again and see how it goes. Another thing to watch here is the facebook's dependency version. You can find a working project here: https://github.com/Karumi/KataScreenshotKotlin. Try cloning the repo and executing |
@Serchinastico If its a permission issue ? then how the entire test suite will run but not for it's very first test class. For my project too, its running perfect with ./gradlew executeScreenshotTests -Precord but not for the particular test method or class |
I meant write permissions as in the file system permissions, not in the AndroidManifest declaration way. Anyways it was just a wild guess as I'm lacking some context here. If I'm understanding your problem right it's that running a single test class fails with the "no such file..." error message, isn't it? Are you sure you are running the command with the whole package name + class name? As in
Try running that on the sample project (https://github.com/Karumi/KataScreenshotKotlin) and see if it works. Once you run it we will know if the issue is in the emulator, in your project's configuration or the library itself. |
Sample Project working fine. Even for my project test is running perfectly getting error in report generation part alone that too on running a particular class or method Logcat trace : Task :app:downloadScreenshots
FAILURE: Build failed with an exception.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. |
If the project I linked you is working try comparing its dependencies and project configuration. More specifically, see if there is any difference in the |
@Serchinastico can you share your mail ID where I can send those fails in private for detail ? |
I'm afraid not, we try to offer support for the library, not your specific project. If you can create an open source minimal project replicating the issue we will be glad to help you and it will be way easier for us to spot the issue. |
I am having a test class under Build Gradle File Dependency androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
// facebook } } On running this command ./gradlew executeScreenshotTests -Pandroid.testInstrumentationRunnerArguments.class=testcases.TesClass -Precord test is running fine and everthing works fine but for report generation I am getting Task :app:downloadScreenshots |
@Serchinastico what more info should I have to provide ? If I run the whole test suite its working fine but getting while running a particular class or method |
@Serchinastico any update on this |
@arjungovindgv why are you using On the other hand, could you check the test you are executing passes just running it from Android Studio? If the issue is not related to the lib version it has to be related with how the library is saving the screenshots and we'd need to know if the test pass from Android Studio. |
Finally after removing the dependency, it got worked. |
You are welcome @arjungovindgv Thanks for using shot, we love seeing people writing tests!!! |
Expection Got :
java.io.FileNotFoundException: /Users/...../app/screenshots/screenshots-default/metadata.xml (No such file or directory)
Command Run : ./gradlew executeScreenshotTests -Pandroid.testInstrumentationRunnerArguments.class=testcases.Test0AppLaunch -Precord
Am I did any mistake ?
while running for the whole test suite its working fine.
The text was updated successfully, but these errors were encountered: