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

fixes #2734: improve iOS testing - #2769

Merged
incanus merged 7 commits into
masterfrom
ios-improve-tests
Oct 27, 2015
Merged

incanus merged 7 commits into
masterfrom
ios-improve-tests

Conversation

@incanus

@incanus incanus commented Oct 23, 2015

Copy link
Copy Markdown
Contributor
  • Got rid of the heading tracking test. Mocking this is proving too complicated (plus I turned up two GL library bugs in the process) and we do builds often enough to keep manual tabs on this functionality. I just don't think it's worth the hassle to automate, especially given the low risk of functionality breakage.
  • Fixed said tracking-related bugs in MGLMapView.
  • Removed the external location mocking library to make this more like other test suites.
  • Moved to Debug since it runs faster these days.
  • Test tweaks for more reliability.
  • Enabled all tests. In future, if tests are flapping, we should remove them and ticket replacement, not disable them.

Going to squash/rebase/finalize etc. before merging.

/cc @friedbunny @1ec5

@incanus incanus added iOS Mapbox Maps SDK for iOS tests labels Oct 23, 2015
@incanus incanus self-assigned this Oct 23, 2015
@incanus incanus added this to the ios-v2.2.0 milestone Oct 23, 2015

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good idea.

@friedbunny

Copy link
Copy Markdown
Contributor

Happy to be rid of the old mock location stuff, was clunky. I'll kick the tires on this a bit now...

@friedbunny

Copy link
Copy Markdown
Contributor

Travis is failing on testCompassTap:

MapViewTests
  testCompassTap, ((tester.mapView.direction) equal to (180)) failed: ("333.527575343") is not equal to ("180") - setting direction should take effect
  /Users/travis/build/mapbox/mapbox-gl-native/test/ios/MapViewTests.m:99

                   180,
                   @"setting direction should take effect");

     Executed 22 tests, with 1 failure (0 unexpected) in 39.952 (39.976) seconds

And bitrise is failing on testUserTrackingModeFollow:

/Users/vagrant/git/test/ios/MapViewTests.m:651: error: -[MapViewTests testUserTrackingModeFollow] : ((tester.mapView.userLocation.coordinate.latitude) equal to (kMockedLatitude)) failed: ("37.785834") is not equal to ("37.775716") - user location latitude should match mocked latitude
Test Case '-[MapViewTests testUserTrackingModeFollow]' failed (3.688 seconds).

@friedbunny

Copy link
Copy Markdown
Contributor

Seeing testUserTrackingModeFollow fail locally, as well:

testUserTrackingModeFollow, ((tester.mapView.userLocation.coordinate.latitude) equal to (kMockedLatitude)) failed: ("37.33233141") is not equal to ("37.775716") - user location latitude should match mocked latitude
/mapbox-gl-native/test/ios/MapViewTests.m:651

@incanus

incanus commented Oct 23, 2015

Copy link
Copy Markdown
Contributor Author

Yeah, still getting fails here, hardly ever locally, but flapping on Bitrise and Travis. Just rebased off of a243f41 to ditch Travis, though.

@incanus

incanus commented Oct 27, 2015

Copy link
Copy Markdown
Contributor Author

Current take here is to:

  • Remove user tracking-related tests as just too unstable; ticket as todo.
  • Remove currently-disabled metrics tests; ticket as todo.
  • Rebase, squash, etc. and merge this sucker.

Refs #2213

/cc @1ec5 @friedbunny @jfirebaugh

@incanus

incanus commented Oct 27, 2015

Copy link
Copy Markdown
Contributor Author

This is passing Bitrise and the iOS slice is no longer on Travis, so will prep this for merge now.

@incanus
incanus merged commit 1421755 into master Oct 27, 2015
@incanus
incanus deleted the ios-improve-tests branch October 27, 2015 17:46
This was referenced Oct 27, 2015
@1ec5

1ec5 commented Oct 29, 2015

Copy link
Copy Markdown
Contributor

Still getting this failure locally:

MapViewTests
  testCompassTap, ((tester.mapView.direction) equal to (180)) failed: ("226.279000419") is not equal to ("180") - setting direction should take effect
  /path/to/mapbox-gl-native/test/ios/MapViewTests.m:70
                   180,
                   @"setting direction should take effect");

@1ec5

1ec5 commented Nov 4, 2015

Copy link
Copy Markdown
Contributor

The failure is being tracked in #2920.

friedbunny added a commit that referenced this pull request Jan 14, 2016
Fails on CI because KIF is unstable. Refs
61615a4, #2769, #2734
@1ec5 1ec5 mentioned this pull request Apr 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

iOS Mapbox Maps SDK for iOS tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants