Code Monkey home page Code Monkey logo

Comments (7)

pedrovgs avatar pedrovgs commented on May 26, 2024

I'll review your issue next week @jonathanrz. Could you please indicate the version of the plugin being used in your project and the device or emulator configuration you are using?

from shot.

jonathanrz avatar jonathanrz commented on May 26, 2024

Pedro,

You can check the code in this branch: https://github.com/jonathanrz/myexpenses-android/tree/shot
The commit where I added the plugin is this: jonathanrz/myexpenses-android@61470df

I am using the version: 0.1.2
I tested in an emulator with api 24.

One possible problem: I am using Android Studio 3.0. Now Android generates another APK with the test code. Shot you be using the default apk or the test apk to take the screenshot?

from shot.

pedrovgs avatar pedrovgs commented on May 26, 2024

@jonathanrz the plugin fails trying to save the screenshots in an API >= 23 because the permission has to be granted in the testing APK and not the APK under test. Using the rule named grant permission test rule does not provide this functionality. This is not supported by the official Facebook library and we don't support it for now :( If you or any other friendly contributor would like to help us this could be an awesome PR.

For now, you can use any device <= API 2 😃

from shot.

pedrovgs avatar pedrovgs commented on May 26, 2024

You should also review your shot configuration. Your project overrides the application id adding a suffix named applicationIdSuffix '.debug' but your shot configuration uses:

shot {
    appId = "br.com.jonathanzanella.myexpenses"
}

Remember to update your shot configuration to

shot {
    appId = "br.com.jonathanzanella.myexpenses.debug"
}

before running your tests again using an API <= 22 device 😃

from shot.

jonathanrz avatar jonathanrz commented on May 26, 2024

@pedrovgs thanks for the help, I think that I fixed the problem with the permissions, but I am constantly receiving this error:

Execution failed for task ':app:executeScreenshotTests'.
java.io.FileNotFoundException: (...)/app/screenshots/screenshots-default/metadata.xml

I updated my branch with the code, I think that you will be able to reproduce the error.

I am still running the test against an api 22 x86 emulator with Android Studio 3.0.

from shot.

jonathanrz avatar jonathanrz commented on May 26, 2024

It was some cache from Android Studio, I runned a clean before running the tests and it was fixed.
Thanks for the help :)

from shot.

pedrovgs avatar pedrovgs commented on May 26, 2024

Happy to see you have your screenshot tests working!

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.