-
Notifications
You must be signed in to change notification settings - Fork 71
test: SDKE-535 Implement Test Coverage for iOS SDK - Part 1 #456
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
Merged
denischilik
merged 14 commits into
main
from
feat/SDKE-535-Implement-Test-Coverage-for-iOS-SDK
Dec 1, 2025
Merged
test: SDKE-535 Implement Test Coverage for iOS SDK - Part 1 #456
denischilik
merged 14 commits into
main
from
feat/SDKE-535-Implement-Test-Coverage-for-iOS-SDK
Dec 1, 2025
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
- Tests transaction events with nested dictionaries - Covers Date objects, Numbers, and Strings in attributes - Verifies custom flags are properly handled
- Automatically replace API keys in URLs with {API_KEY} placeholder
- Rename body files to remove API keys from filenames
- Auto-regenerate mapping files with sanitized data
- Update all references automatically
This ensures no API keys are committed to the repository.
- Tests transaction event type with MPEvent - Covers custom attributes: string, number, date, nested dictionary - Verifies custom flags (Not_forwarded_to_providers) - Uses static dates for deterministic testing - Based on ViewController.m logEvent method (lines 131-147)
- Tests screen view logging functionality - Based on ViewController.m logScreen method (lines 149-151) - Verifies screen name 'Home Screen' is properly tracked - Covers screen view event type (dt: 'v') serialization
- Tests logCommerceEvent with product and transaction attributes - Covers product attributes (name, SKU, price, brand, category, coupon) - Covers transaction attributes (revenue, tax, shipping, affiliation, transaction ID) - Verifies commerce event custom attributes and checkout options - Based on ViewController.m logCommerceEvent method (lines 153-180) - Related to SDKE-535 test coverage implementation
- Added Test 5: Rokt Select Overlay Placement - Tests Rokt SDK integration through mParticle - Verifies identity change when selecting placements with custom attributes - Based on ViewController.m selectOverlayPlacement method (lines 182-192)
jamesnrokt
approved these changes
Nov 24, 2025
| } | ||
|
|
||
| // Test 4: Log Commerce Event with Product and Transaction | ||
| // Based on ViewController.m logCommerceEvent method (lines 153-180) |
Collaborator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
| // Based on ViewController.m logCommerceEvent method (lines 153-180) | |
| // Based on ViewController.m logCommerceEvent method |
Nit: Line numbers here and other comments with line numbers are highly likely to change separately to the comment
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks will update
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.
Background
First PR in a series establishing automated integration test infrastructure for the iOS SDK. This PR sets up WireMock-based testing framework with automated recording/verification and adds initial test coverage for core SDK functionality. Future PRs will incrementally add more test scenarios.
What Has Changed
Mappings are now stored in unescaped (readable) format
🛠 Utility Scripts
Two new scripts for mapping management:
transform_mapping_body.py- Handles escape/unescape transformationssanitize_mapping.py- Prepares mappings for useChecklist
Additional Notes
This is part 1 of the test coverage implementation. Subsequent PRs will add more test cases as tracked in subtask SDKE-632.
All integration tests pass successfully with 100% mapping match rate.
Reference Issue (For employees only. Ignore if you are an outside contributor)