Issue
I have to create a script using Espresso to test my app in Firebase test lab. My app uses Camera to capture images and I have opened the default camera app.
For testing on my device I give package name for the testing device that I am using. The issue is that the camera app package names for different Android devices is different, and we do not know each of it. Also it is not good to hard code package names.
I have searched out and not able to find a way to find a solution.
Thanking in advance.
Solution
I don't think there's a good way to do this with the actual camera app, since the camera app often differs between device models and Android versions.
How about you fake this dependency in your tests? Either by abstracting the code that calls the camera app, or by adding your own fake camera activity that will get called and returns you a picture the way it's supposed to happen.
Answered By - Maik
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.