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.

…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.
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.69%. Comparing base (d009e61) to head (377ce58).

❗ There is a different number of reports uploaded between BASE (d009e61) and HEAD (377ce58). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (d009e61) HEAD (377ce58)
integration-tests 1 0
Additional details and impacted files
@@              Coverage Diff               @@
##             develop     #167       +/-   ##
==============================================
- Coverage      45.74%   26.69%   -19.06%     
+ Complexity      1232      868      -364     
==============================================
  Files            302      296        -6     
  Lines           9225     8977      -248     
  Branches        1300     1266       -34     
==============================================
- Hits            4220     2396     -1824     
- Misses          4466     6324     +1858     
+ Partials         539      257      -282     
Flag Coverage Δ
integration-tests ?
unit-tests 26.69% <ø> (-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.

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