Skip to content

SDKS-4759 - Implement end-to-end instrumented tests for the MFA authentication migration module.#167

Open
witrisna wants to merge 1 commit intodevelopfrom
SDKS-4759
Open

SDKS-4759 - Implement end-to-end instrumented tests for the MFA authentication migration module.#167
witrisna wants to merge 1 commit intodevelopfrom
SDKS-4759

Conversation

@witrisna
Copy link
Contributor

@witrisna witrisna commented Mar 3, 2026

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:

  • 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.

@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 13.33333% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.67%. Comparing base (8ab10dc) to head (f187309).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...ity/auth/migration/DefaultStorageClientProvider.kt 0.00% 8 Missing ⚠️
...n/com/pingidentity/auth/migration/AuthMigration.kt 0.00% 2 Missing ⚠️
...ntity/auth/migration/LegacyAuthenticationConfig.kt 0.00% 2 Missing ⚠️
...ngidentity/auth/migration/StorageClientProvider.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #167      +/-   ##
=============================================
- Coverage      46.70%   46.67%   -0.03%     
+ Complexity      1265     1264       -1     
=============================================
  Files            305      306       +1     
  Lines           9203     9213      +10     
  Branches        1306     1305       -1     
=============================================
+ Hits            4298     4300       +2     
- Misses          4335     4342       +7     
- Partials         570      571       +1     
Flag Coverage Δ
integration-tests 28.35% <100.00%> (+1.79%) ⬆️
unit-tests 27.62% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@witrisna witrisna force-pushed the SDKS-4759 branch 2 times, most recently from b4d4d1f to ec5f8f9 Compare March 4, 2026 22:33
@witrisna witrisna force-pushed the SDKS-4759 branch 3 times, most recently from be6bd68 to 2177baa Compare March 26, 2026 19:52
@witrisna witrisna requested review from rodrigoareis, spetrov and vibhorgoswami and removed request for rodrigoareis March 26, 2026 19:55
@witrisna witrisna force-pushed the SDKS-4759 branch 3 times, most recently from a6b5c8f to 3052c76 Compare March 26, 2026 21:07
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant