nalbion / robotium-maps

Robotium extension with map support
Apache License 2.0
5 stars 1 forks source link

Black box testing Google Map #1

Open nIvanovp opened 8 years ago

nIvanovp commented 8 years ago

Hello, I was trying to get GoogleMap object in black box testing. The application and robotium solo test re-signed the same key. For getting googlemap obj I use the following code

FragmentActivity = fragmentActivity = (FragmentActivity)solo.getCurrentActivity();
GoogleMap map = ((SupportMapFragment) fragmentActivity.getSupportFragmentManager().findFragmentByTag(tag)).getMap();

But application doesn't launch and in logcat I see following:

No static method D(Landroid/content/Context;)
V in class Lcom/google/android/gms/common/GooglePlayServicesUtil; or its super classes (declaration of 'com.google.android.gms.common.GooglePlayServicesUtil' appears in /data/app/com.via.rider.solo-1/base.apk)
java.lang.NoSuchMethodError: No static method D(Landroid/content/Context;)
V in class Lcom/google/android/gms/common/GooglePlayServicesUtil; or its super classes (declaration of 'com.google.android.gms.common.GooglePlayServicesUtil' appears in /data/app/com.via.rider.solo-1/base.apk)
E/AsyncTaskServiceImpl﹕ Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
            at com.google.android.gms.gass.a.a.computeSerializedSize(SourceFile:128)
            at com.google.protobuf.nano.k.getSerializedSize(SourceFile:65)
            at com.google.protobuf.nano.k.toByteArray(SourceFile:100)

Perhaps, anybody know how can get the object of googlemap via black box testing. Thanks.

Best regards, Nikolai

nalbion commented 8 years ago

Sorry, this was written for an older version of the Android Gmaps API. Feel free to submit a PR if you can figure out how to support the new API