RobotiumTech / robotium

Android UI Testing
http://www.robotium.org
Apache License 2.0
2.86k stars 786 forks source link

Black box testing Google Map #797

Open nIvanovp opened 9 years ago

nIvanovp commented 9 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

IgorGanapolsky commented 8 years ago

@nIvanovp Did you find a resolution for this, or did you end up going with other tools like UIAutomator?