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

Introduces a test harness for integrated regression tests on iOS #10873

Merged
merged 3 commits into from
Jan 20, 2018

Conversation

akitchen
Copy link
Contributor

@akitchen akitchen commented Jan 9, 2018

This PR introduces two new targets in ios.xcodeproject: Integration Test Harness.app and an integration.xctest bundle. The former is an empty iOS app providing nothing more than an app delegate and a window, and the latter is a test bundle which contains one integrated test to guard against a potential regression of #10755. In order to write a legitimately failing behavioral test we need to place the map view in a superview within a key window, and it is not possible to make a window key in our test.xctest bundle as it does not use an iOS app as its bundle loader.

It is my hope that this will help us when it comes time to refactor to address #10771, for example. This can also serve as a starter pattern for writing regression tests against this kind of crash in the future (or at least as a conversation starter). I'm super open to suggestions around organizing/naming this stuff, as well as on this approach in general.

The failure on CI has been narrowed down to an Xcode 9.0 issue. We should hold this back until we're able to move forward to a newer version of Xcode on Circle CI. I also want to tidy up the commit log before merging.

Update: we have moved forward to Xcode 9.2 on CI, and the commit log is tidier now. Should be ready to merge. I'm going to wait to rebase on top of #10918 however.

/cc @friedbunny

@akitchen akitchen added iOS Mapbox Maps SDK for iOS tests ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold labels Jan 9, 2018
@akitchen akitchen force-pushed the ios-integration-harness branch from 59bf34c to 192cae8 Compare January 10, 2018 22:52
@akitchen akitchen self-assigned this Jan 10, 2018
@akitchen akitchen force-pushed the ios-integration-harness branch from 192cae8 to 8f9a48e Compare January 10, 2018 23:14
@akitchen akitchen requested a review from friedbunny January 11, 2018 00:56
@akitchen
Copy link
Contributor Author

Update - now that we've merged the change that brings us on to Circle's macOS image with Xcode 9.2, we're good to start including tests like this one.

Thanks @friedbunny !

@akitchen akitchen removed the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Jan 11, 2018
@akitchen akitchen force-pushed the ios-integration-harness branch 2 times, most recently from 8b96c33 to 0a2a5f2 Compare January 12, 2018 18:10
@akitchen
Copy link
Contributor Author

Going to wait to rebase on top of #10918

@friedbunny
Copy link
Contributor

Looking forward to filling these out and getting rid of the KIF target. 😁

Andrew Kitchen added 3 commits January 19, 2018 14:57
This will allow us to write lightweight integration tests between MGLMapView and the core renderer.
Also includes a test for the recent custom layer memory fix, reverting the fix in order to demonstrate the failing test.
Revert this commit to see integration test fail.
@akitchen akitchen force-pushed the ios-integration-harness branch from 0a2a5f2 to 15576a5 Compare January 19, 2018 23:02
@akitchen akitchen merged commit 7f6d99b into master Jan 20, 2018
@friedbunny friedbunny deleted the ios-integration-harness branch May 25, 2018 00:20
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.

2 participants