SDKS-4759 - Implement end-to-end instrumented tests for the MFA authentication migration module.#167
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## develop #167 +/- ##
==============================================
- Coverage 44.92% 26.22% -18.71%
+ Complexity 1232 868 -364
==============================================
Files 302 296 -6
Lines 9389 9141 -248
Branches 1352 1318 -34
==============================================
- Hits 4218 2397 -1821
- Misses 4630 6488 +1858
+ Partials 541 256 -285
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ntication migration module. The new test suite verifies the full migration pipeline from legacy ForgeRock Authenticator SDK storage (encrypted SharedPreferences and AndroidKeyStore) to the modern Ping SDK SQLite storage. Key changes: - Added `MigrationTest.kt` containing comprehensive instrumented tests for TOTP, HOTP, Push credentials, Push notifications, and device token migration. - Integrated `MockWebServer` to simulate PingAM registration endpoints for authenticating legacy Push mechanisms during tests. - Implemented robust cleanup logic to ensure test isolation by removing SharedPreferences, KeyStore entries, and SQLite databases before and after each test. - Verified migration idempotency, progress event emission order, and automatic cleanup of legacy data upon successful migration. - Updated `build.gradle.kts` with necessary `androidTest` dependencies including `mockwebserver`, `nimbus-jose-jwt`, and the legacy `forgerock-authenticator` SDK. - Configured JNI library packaging options in `build.gradle.kts` to resolve duplicate `.so` file conflicts during instrumentation tests.
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
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.
JIRA Ticket
SDKS-4759
Description
The new test suite verifies the full migration pipeline from legacy ForgeRock Authenticator SDK storage (encrypted SharedPreferences and AndroidKeyStore) to the modern Ping SDK SQLite storage.
Key changes:
MigrationTest.ktcontaining comprehensive instrumented tests for TOTP, HOTP, Push credentials, Push notifications, and device token migration.MockWebServerto simulate PingAM registration endpoints for authenticating legacy Push mechanisms during tests.build.gradle.ktswith necessaryandroidTestdependencies includingmockwebserver,nimbus-jose-jwt, and the legacyforgerock-authenticatorSDK.build.gradle.ktsto resolve duplicate.sofile conflicts during instrumentation tests.