-
Notifications
You must be signed in to change notification settings - Fork 72
feat: SDKE-64 Improve mParticle.m test coverage in swift 3 #409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
denischilik
wants to merge
16
commits into
main
from
feat/SDKE-64-improve-MParticle-m-Test-Coverage-in-Swift-3
Closed
feat: SDKE-64 Improve mParticle.m test coverage in swift 3 #409
denischilik
wants to merge
16
commits into
main
from
feat/SDKE-64-improve-MParticle-m-Test-Coverage-in-Swift-3
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* - extract method setOptOutCompletion - create tests for setOptOutCompletion method * - extract callback into method identifyNoDispatchCallback * - add tests for identifyNoDispatchCallback method * - extract configuration logic into configureWithOptions method * - add test to check default configuration when method was called configureWithOptions * - address PR review comments. - sut was renamed to mparticle - rename test methods
* - add settings provider * - add test to check default configuration * - add SettingsProviderMock * - cover scenarios what were configuration not nill and we need update settings * - add MPUserDefaultsProtocol to replace MPUserDefaults in swift code with mock - extract callback code into startWithKeyCallback method - write test to cover uncovered scenarios of startWithKeyCallback
* - extract callback logic into beginTimedEventCompletionHandler method - enable gather coverage in schema * - add test for beginTimedEventCompletionHandlerData method * - move mocks in Mock folder * - rewrite SettingsProviderMock in Swift * - add MPDataPlanFilterProtocol - add mock for this protocol * - add test to increase test coverage * - extract callback to method logEventCallback * - cover logEventCallback with tests * - extract logScreen callback into logScreenCallback method * - cover logScreenCallback with tests * - check_script.sh can be launched without creating venv
* - extract callback into leaveBreadcrumb * - cover leaveBreadcrumbCallback with tests * - extract callback into logErrorCallback * - cover logErrorCallback with tests * - extract callback into logExceptionCallback * - cover logExceptionCallback with tests * - test logCrashCallback * - test logCommerceEventCallback * - test logLTVIncreaseCallback * - test logNetworkPerformanceCallback
* - add MPListenerControllerProtocol - initialize listenerController property - create mock MPListenerControllerMock - replace singelton usage in mparticle.m - cover listener controller usage with test * - location related test where excluded from testing when MPARTICLE_LOCATION_DISABLE not set * - tvos and location related tests should be executed within correct configuration
* - generalize property type to protocol for testability/mocking * - create script to verify usage of [MParticle sharedInstance] in methods - create mock to use in swift tests * - add StateMachineProtocol * - exclude tests not related to MPARTICLE_LOCATION_DISABLE and tvos * - add MPStateMachineMock * - mock should have location related fields * - beginTimedEvent fully covered with tests * - add test to check setOptOutMethod and to check how mock works * - method should be available for ios * - CoreLocation should be imported into mock * - ignore warning - remove russian from script * message * reorder
* - use kitContainer protocol instead of kitContainer_PRIVATE * - make property available fro protocol * - add setter to keep _kitContainer_PRIVATE and _kitContainer properties the same - access kitsInitialized property through protocol * - add MPKitContainerMock * - create two tests to check that MPKitContainerMock works as expected
* - create protocol for MPPersistenceController_PRIVATE * - add test to check MPPersistenceControllerMock
* fix: Update Hashed Email Logic with Unassigned
- macroses usage were removed from mparticle.m file - make MPLog methods accessible from objc code - use MPLog methods instead macroses - increase timeout for flaky test
* - extract executor code to call it from mParticle file, old code still available because it is used from different places * - use executor instead dispatch_async * - move executor in separate files
* - add executor mock * - update nullability * - add tests
Contributor
Author
|
Wrong target branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the 3 PR in the series aimed at improving the test coverage of mParticle.m. The first PR is #407
Summary
Testing Plan
Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)