Skip to content

Add concurrent REST scenarios to AuthFlowTester - #4173

Merged
wmathurin merged 3 commits into
forcedotcom:devfrom
wmathurin:authflowtester-concurrent-rest-requests
Sep 15, 2026
Merged

wmathurin merged 3 commits into
forcedotcom:devfrom
wmathurin:authflowtester-concurrent-rest-requests

Conversation

@wmathurin

@wmathurin wmathurin commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep the existing single REST request flow unchanged and add a separate full-width concurrent-request card.
  • Run 5, 10, 20, or 50 mixed read-only requests using API Resources and Describe Global, weighted toward the cheaper API Resources call and avoiding permission-dependent endpoints.
  • Show queued, in-flight, success, and failure state per request, with copyable diagnostics when a failed square is tapped.
  • Support manual, revoke-in-flight, and logout-in-flight scenarios bound to the account captured when the batch starts.
  • Add generic, RTR, DPoP, DPoP+RTR, restart, deterministic-error, and multi-user UI coverage.
  • Update the AuthFlowTester test inventory and screenshots.

Dependency

The concurrent refresh paths exposed cooperative-executor starvation in the SDK safe collection writers. The focused UI validation below was run with #4174 applied; merge #4174 before relying on this suite as a stable concurrent-token baseline.

Validation

  • AuthFlowTester app and UI-test targets build successfully.
  • Valid RTR session: 20/20 mixed requests succeeded with peak in-flight of 20.
  • Deterministic failure: the batch settled and the failed square exposed the request number, type, endpoint, status, message, and Copy action.
  • Logout during an RTR batch remained logged out after a cold relaunch.
  • DPoP + RTR invalid-token recovery completed 20/20 requests while preserving binding and rotating access and refresh tokens.
  • DPoP revoke during flight settled the batch and a follow-up request recovered successfully.
  • Multi-user logout during flight preserved the remaining RTR account across a cold relaunch and removed the logged-out DPoP + RTR account.
  • Focused final reruns passed for the valid RTR batch and logout-under-load cold relaunch.

Screenshots

The completed grid below was captured from the passing authenticated 20-request XCTest run. The error-details image uses the deterministic DEBUG failure hook exercised by the UI suite.

Completed 20-request batch

Concurrent REST request card showing twenty successful requests

Tappable request error details

Concurrent REST request error details sheet

@github-actions

Copy link
Copy Markdown
1 Warning
⚠️ Big PR, try to keep changes smaller if you can.

Generated by 🚫 Danger

@github-actions

Copy link
Copy Markdown
TestsPassed ✅SkippedFailed
SalesforceSDKCore iOS ^18 Test Results1045 ran1045 ✅
TestResult
No test annotations available

@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.57%. Comparing base (e6b4d80) to head (5e74107).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #4173   +/-   ##
=======================================
  Coverage   71.57%   71.57%           
=======================================
  Files         254      254           
  Lines       23029    23029           
=======================================
  Hits        16483    16483           
  Misses       6546     6546           
Components Coverage Δ
Analytics 70.78% <ø> (ø)
Common 71.25% <ø> (-0.10%) ⬇️
Core 67.29% <ø> (+0.01%) ⬆️
SmartStore 73.45% <ø> (ø)
MobileSync 88.96% <ø> (-0.03%) ⬇️
see 11 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sfdctaka sfdctaka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
TestsPassed ☑️SkippedFailed ❌️
AuthFlowTester UI Test Results all119 ran50 ✅69 ❌
TestResult
AuthFlowTester UI Test Results all
AuthFlowTesterUITests.xctest
testMigrateCAToBeacon()❌ failure
RefreshTokenMigrationTests.testMigrateCAUserAgentToBeaconWebServer()❌ failure
RefreshTokenMigrationTests.testMigrateCAUserAgentToECAWebServer()❌ failure
RefreshTokenMigrationTests.testMigrateCA_AddMoreScopes()❌ failure
RefreshTokenMigrationTests.testMigrateBeaconToCA()❌ failure
RefreshTokenMigrationTests.testFlagDiversity_MigratedBeaconJwtVsNonHybridOpaque()❌ failure
RefreshTokenMigrationTests.testMigrateCAToBeaconAndBack()❌ failure
RefreshTokenMigrationTests.testMigrateOneUserOnly()❌ failure
WelcomeLoginTests.testWelcomeDiscovery_AdvancedAuthLoginHost_DynamicConfig()❌ failure
WelcomeLoginTests.testWelcomeDiscovery_RegularAuthLoginHost()❌ failure
WelcomeLoginTests.testWelcomeDiscovery_AdvancedAuthLoginHost()❌ failure
WelcomeLoginTests.testWelcomeDiscovery_RegularAuthLoginHost_DynamicConfig()❌ failure
BeaconLoginTests.testBeaconJwt_SubsetScopes()❌ failure
BeaconLoginTests.testBeaconOpaque_AllScopes()❌ failure
BeaconLoginTests.testBeaconOpaque_DefaultScopes()❌ failure
DPoPLoginTests.test_givenDPoPRtrNoHybrid_whenLogin_thenRefreshTokenRotatesAndDPoPBindingHolds()❌ failure
DPoPLoginTests.test_givenDPoPECA_whenAdminLogin_thenDPoPBindingWorksThroughBrowser()❌ failure
DPoPLoginTests.test_givenDPoPRtrHybrid_whenLogin_thenRefreshTokenRotatesAndDPoPBindingHolds()❌ failure
DPoPLoginTests.test_givenDPoPRequestsInFlight_whenRevoked_thenBindingIsPreserved()❌ failure
DPoPLoginTests.test_givenDPoPRTRSessionWithInvalidAccessToken_whenMakingManyRequests_thenReplayPreservesBinding()❌ failure
DPoPLoginTests.test_givenDPoPHybrid_whenLogin_thenTokenTypeIsDPoPAndRefreshWorks()❌ failure
DPoPLoginTests.test_givenTwoDPoPUsers_whenSwitchAndRefresh_thenTokensAndNoncesAreIsolated()❌ failure
MultiUserLoginTests.testDifferentAppTypes_LogoutCaUser_EcaUserUnaffected()❌ failure
MultiUserLoginTests.testFirstStatic_SecondDynamic_DifferentApps()❌ failure
MultiUserLoginTests.testDifferentAppTypes_RevokeAccessForCaUser_EcaUserUnaffected()❌ failure
MultiUserLoginTests.testFlagDiversity_BeaconNonHybridJwtVsHybridOpaque()❌ failure
MultiUserLoginTests.testFirstDynamic_SecondStatic_DifferentApps()❌ failure
MultiUserLoginTests.testLogoutUserWithDynamicConfig_OtherUserUnaffected()❌ failure
MultiUserLoginTests.testBothStatic_SameApp_SameScopes()❌ failure
MultiUserLoginTests.testBeaconAndNonBeacon_MultiUser()❌ failure
MultiUserLoginTests.test_givenRTRAndDPoPRTRUsers_whenCurrentUserLogsOutUnderLoad_thenOtherUserRemainsUsable()❌ failure
MultiUserLoginTests.testBothStatic_SameApp_DifferentScopes()❌ failure
MultiUserLoginTests.testBothDynamic_DifferentApps()❌ failure
MultiUserLoginTests.testBothStatic_DifferentApps()❌ failure
LoginForAdminTests.testLoginForAdmin_WebServerFlowEnabled()❌ failure
LoginForAdminTests.testLoginForAdmin_WebServerFlowDisabled()❌ failure
LegacyLoginTestsNotHybrid.testCAOpaque_DefaultScopes_WebServerFlow()❌ failure
LegacyLoginTestsNotHybrid.testCAOpaque_SubsetScopes_WebServerFlow()❌ failure
LegacyLoginTestsNotHybrid.testCAOpaque_SubsetScopes_WebServerFlow_InAppWebView()❌ failure
LegacyLoginTestsNotHybrid.testCAOpaque_AllScopes_WebServerFlow_InAppWebView()❌ failure
AdvancedAuthBeaconLoginTests.testBeaconJwt_DefaultScopes()❌ failure
AdvancedAuthBeaconLoginTests.testBeaconOpaque_DefaultScopes()❌ failure
AdvancedAuthBeaconLoginTests.testBeaconOpaque_SubsetScopes()❌ failure
AdvancedAuthBeaconLoginTests.testBeaconJwt_SubsetScopes()❌ failure
AdvancedAuthBeaconLoginTests.testBeaconJwt_AllScopes()❌ failure
ECALoginTests.testDynamicConfigurationWithInvalidClientId()❌ failure
ECALoginTests.testECAJwt_SubsetScopes()❌ failure
ECALoginTests.testECAOpaque_DefaultScopes()❌ failure
ECALoginTests.testECAOpaque_AllScopes()❌ failure
ECALoginTests.testECAJwt_DefaultScopes()❌ failure
ForceAdvancedAuthTests.testForceAdvancedAuth_AddAdditionalUser_BackButtonAccessible()❌ failure
ForceAdvancedAuthTests.testForceAdvancedAuth_Disabled_BackAndGearStillPresent()❌ failure
ForceAdvancedAuthTests.testForceAdvancedAuth_Disabled_StandardServer_UsesInAppWebView()❌ failure
ForceAdvancedAuthTests.testForceAdvancedAuth_StandardServer_LaunchesExternalBrowser()❌ failure
RTRLoginTests.testECAOpaqueRtr_NoHybrid()❌ failure
RTRLoginTests.testECAJwtRtr_Hybrid_WithRestart()❌ failure
RTRLoginTests.test_givenRTRRequestsInFlight_whenRevoked_thenBatchSettlesAndFollowUpSucceeds()❌ failure
RTRLoginTests.testECAOpaqueRtr_NoHybrid_WithRestart()❌ failure
LegacyLoginTests.testCAOpaque_DefaultScopes_UserAgentFlow()❌ failure
LegacyLoginTests.testCAOpaque_AllScopes_WebServerFlow_InAppWebView()❌ failure
ConcurrentRestRequestTests.test_givenRTRRequestsInFlight_whenLoggingOut_thenColdRelaunchStaysLoggedOut()❌ failure
ConcurrentRestRequestTests.test_givenValidRTRSession_whenMakingTwentyMixedRequests_thenAllSucceed()❌ failure
ConcurrentRestRequestTests.test_givenDeterministicRequestFailure_whenTappingRedSquare_thenDetailsAreShown()❌ failure
RefreshTokenMigrationWithRestartTests.testMigrateCAToBeacon_WithRestart()❌ failure
RefreshTokenMigrationWithRestartTests.testMigrateMultipleUsers_WithRestart()❌ failure
RefreshTokenMigrationWithRestartTests.testMigrateCAToECA_WithRestart()❌ failure
LoginWithRestartTests.testWelcomeDiscovery_WithRestart()❌ failure
LoginWithRestartTests.testBeaconJwt_DefaultScopes_DynamicConfiguration_WithRestart()❌ failure
LoginWithRestartTests.testECAOpaque_DefaultScopes_WithRestart()❌ failure

@sfdctaka sfdctaka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@wmathurin
wmathurin merged commit dd5dcc3 into forcedotcom:dev Sep 15, 2026
21 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants