Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Scale Instrumentation tests #6803

Merged
merged 1 commit into from
Nov 9, 2016
Merged

Scale Instrumentation tests #6803

merged 1 commit into from
Nov 9, 2016

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Oct 24, 2016

WIP to cover a big part of our public API with instrumentation tests. This will help us start refactor work from https://github.com/mapbox/mapbox-gl-native/projects/4 without breaking the whole API.

Initial focus:

  • moveCamera
  • easeCamera
  • AnimateCamera
  • setBearing
  • setPitch
  • setLatLng
  • CompassView
  • MyLocationView
  • MyLocationTracking/MyLocationBearing
  • Attribution
  • addMarker
  • addMarkerView
  • addPolygon
  • addPolyline
  • selectMarker (show infowindow)
  • CustomInfoWindowAdapter
  • ...

@tobrun tobrun added Android Mapbox Maps SDK for Android ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold labels Oct 24, 2016
@mention-bot
Copy link

@tobrun, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bleege, @ivovandongen and @cammace to be potential reviewers.

@tobrun tobrun self-assigned this Oct 25, 2016
@tobrun tobrun force-pushed the tobrun-instrumentation-tests branch 3 times, most recently from 5ebdc95 to 4015c1a Compare November 1, 2016 11:56
@tobrun tobrun added ✓ ready for review and removed ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold labels Nov 1, 2016
@tobrun tobrun changed the title WIP Instrumentation tests Scale Instrumentation tests Nov 1, 2016
@tobrun
Copy link
Member Author

tobrun commented Nov 1, 2016

@ivovandongen do you want to review?

@ivovandongen
Copy link
Contributor

@tobrun Great stuff! I do get some failures though:

screen shot 2016-11-02 at 11 47 23

See log output

@tobrun
Copy link
Member Author

tobrun commented Nov 2, 2016

@ivovandongen thank you for testing, this was on a Nexus 5x?

@ivovandongen
Copy link
Contributor

@tobrun Yes, sorry. It's my 5x with latests os updates.

@tobrun
Copy link
Member Author

tobrun commented Nov 2, 2016

was able to reproduce with emulator, was missing some zoom deltas and moveBy was failing because the delta wasn't big enough for that type of test.

screen shot 2016-11-02 at 13 57 05

Going to do a final cleanup and squash the commits

@tobrun
Copy link
Member Author

tobrun commented Nov 7, 2016

I resolved the merging conflicts, @ivovandongen want to review?

@tobrun tobrun added this to the android-v5.0.0 milestone Nov 7, 2016
@tobrun tobrun force-pushed the tobrun-instrumentation-tests branch from 9491b9b to cd795d7 Compare November 7, 2016 14:29
@ivovandongen
Copy link
Contributor

@tobrun I'm getting some compile errors on a fresh checkout of this branch:

/Users/ivo/git/mapbox-gl-native/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/widgets/AttributionTest.java
Error:(53, 79) error: cannot find symbol variable attribution_names
Error:(54, 79) error: cannot find symbol variable attribution_links
Error:(77, 33) error: cannot find symbol variable attributionsDialogTitle
Error:(92, 33) error: cannot find symbol variable attributionsDialogTitle
Error:(106, 33) error: cannot find symbol variable attributionsDialogTitle
Error:(120, 33) error: cannot find symbol variable attributionsDialogTitle
Error:(124, 33) error: cannot find symbol variable attributionTelemetryTitle
/Users/ivo/git/mapbox-gl-native/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/widgets/MyLocationViewTest.java
Error:(82, 102) error: cannot find symbol variable ic_mylocationview_normal
Error:(84, 102) error: cannot find symbol variable ic_mylocationview_bearing
Error:Execution failed for task ':MapboxGLAndroidSDKTestApp:compileDebugAndroidTestJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

@tobrun
Copy link
Member Author

tobrun commented Nov 8, 2016

those seems regressions from #6894, fixing up

@tobrun tobrun force-pushed the tobrun-instrumentation-tests branch from cd795d7 to e3d78fe Compare November 8, 2016 14:17
@tobrun
Copy link
Member Author

tobrun commented Nov 8, 2016

@ivovandongen fixed up the rebase issue with e3d78fe.
Still wondering why CI didn't catch this issue because it should have flagged it.

@ivovandongen
Copy link
Contributor

@tobrun One last failure in MarkerTest#showInfoWindowTest:


java.lang.IllegalStateException: MapView#onStart() was not called. You must call this method from the parent's {@link Activity#onStart()} or {@link Fragment#onStart()}.
at com.mapbox.mapboxsdk.maps.MapView.onResume(MapView.java:596)
at com.mapbox.mapboxsdk.testapp.activity.espresso.EspressoTestActivity.onResume(EspressoTestActivity.java:42)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1269)
at android.support.test.runner.MonitoringInstrumentation.callActivityOnResume(MonitoringInstrumentation.java:564)
at android.app.Activity.performResume(Activity.java:6768)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3377)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3440)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2713)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

…ity class, remove inheritance in runtime style test

update gitignore for generated tests

add camera move test

add realtime geojson to be excluded when generating Activity sanity tests

by default show workaround for showing a MapView in a dialog

add annotation tests

remove older camera tests, introduce tests for move, ease and animate, bring back setLatLng and getLatLng on MapView, add tests for internal camera API.

compass view tests

add tests for attribution and logo.

fix annotation tests

Rename Actiivity test class, split up annotation tests, added MarkerView tests, added infowindow tests, added MyLocationView tests

fix addRemoveLayer test by integrating map interactions inside a ViewAction
@tobrun tobrun force-pushed the tobrun-instrumentation-tests branch from e3d78fe to 13b4b44 Compare November 9, 2016 10:40
Copy link
Contributor

@ivovandongen ivovandongen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@tobrun tobrun merged commit 33aa14c into master Nov 9, 2016
@tobrun tobrun deleted the tobrun-instrumentation-tests branch November 9, 2016 11:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants