Comments (7)
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.
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.
@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.
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.
@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.
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.
Happy to see you have your screenshot tests working!
from shot.
Related Issues (20)
- 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
- Configuration with name 'androidTestImplementation' not found. HOT 1
- Test Run twice using version 6.0.0
- JUnit test reports?
- Cannot save screenshots on Windows, works on MACos HOT 3
- Is there any way to capture a snapshot of a BottomSheetDialog HOT 3
- Wrong SDCard folder on Android 5.1
- Screenshot of a Dialog in Compose shown over the app content
- [6.1.0][Api 30] NoSuchMethodException android.view.ViewRootImpl WindowAttachment.generateAttachInfo HOT 1
- Support for Gradle Kotlin DSL
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.