I try to run my tests in Google Cloud Test Lab. My unit tests and espressos test passe with no problems.
But for some espresso tests that require Google Apis, like maps and places, my tests fails.
In more when I run this exact code in Google Cloud Test Lab it fails and return "No play services availables !" :
@org.junit.Test
public void testPlayServicesAvailables() throws Exception {
GoogleApiAvailability googleAPI = GoogleApiAvailability.getInstance();
int result = googleAPI.isGooglePlayServicesAvailable(WayzUpApp.getContext());
if (result != ConnectionResult.SUCCESS) {
throw new Exception("No play services availables !");
}
}
To launch my cloud tests I use the command :
gcloud beta test android run --app app/build/outputs/apk/app-debug.apk --test app/build/outputs/apk/app-debug-androidTest.apk --device-ids Nexus5 --os-version-ids 23 --locales fr --orientations portrait
Is there a way to make Play services availables on Cloud Test Lab?
Thanks.