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.
$5 per hour for each physical device. $1 per hour for each virtual device.
Robo test analyzes the structure of your app's user interface (UI) and then explores it methodically, automatically simulating user activities.
On the Firebase console navigation bar, click Test Lab, and then click Get Started -> Run a Robo test. Click Browse, browse to your app APK, and then click Continue. Define your test matrix by selecting which devices, Android API levels, screen orientations and locales you want to test your app against.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With