Authentication Testing

Session Management Test Cases That Prove Expiry Across the Browser, Server and Every Active Context

60 practical cases proving that expired and revoked sessions stop working across the browser, APIs, tabs and devices.

2026-07-28 Approximately 17 min read

A redirect to the login page does not prove that a session has expired.

A complete session-management test must verify that:

  • authentication creates a fresh session bound to the intended identity
  • the pre-authentication session identifier is replaced or safely transitioned
  • idle and absolute lifetime rules are independently enforced
  • only documented user activity resets the idle timer
  • background traffic cannot silently keep an abandoned session alive
  • renewal rotates session secrets without leaving old tokens reusable
  • all protected APIs reject an expired or revoked session
  • tabs, browser contexts and devices follow the documented sharing policy
  • remember-me evidence does not replace required authentication or reauthentication
  • reauthentication creates a fresh permitted state without restoring an invalid old session

This guide contains 60 practical session-management test cases covering creation, rotation, idle and absolute timeout, sliding expiration, remember me, browser tabs, background activity, concurrent devices, revocation and reauthentication.

Use the Login Page Test Cases guide for the authentication transaction that creates the session. Use the MFA Test Cases guide when reauthentication or a sensitive action requires an additional factor.

Session lifecycle showing creation, activity, idle and absolute timeout, renewal, invalidation and reauthentication
Session lifecycle showing creation, activity, idle and absolute timeout, renewal, invalidation and reauthentication

The Minimum Session Management Smoke Test

When release time is limited, begin with these ten cases.

Minimum Session Smoke Test
IDTestWhat it proves
SES-01Authenticate and compare the session before and after loginAuthentication creates or rotates the session rather than preserving a known anonymous identifier.
SES-10Remain inactive until just before the idle thresholdThe session does not expire earlier than the documented policy.
SES-11Cross the idle threshold and request a protected resourceThe server invalidates the inactive session.
SES-16Replay the expired token directly against a protected APIThe login redirect is not only a browser-side effect.
SES-20Keep sending valid activity beyond the absolute lifetimeActivity cannot defeat the maximum session age.
SES-27Trigger session renewal and replay the old tokenRotation does not leave an indefinite overlap window.
SES-39Leave one tab idle while another tab performs documented activityShared-tab behaviour matches the contract.
SES-47Open the same account on two devicesConcurrent-session policy is explicit and enforced.
SES-55Change the password and reuse an existing sessionSecurity-relevant revocation follows the documented scope.
SES-60Reauthenticate after expiry and compare the new sessionRecovery creates a fresh allowed session and the old one remains unusable.

The smoke set verifies the primary lifecycle. It does not replace cookie-attribute testing, token cryptography review, penetration testing or a dedicated logout guide.

Define the Session Acceptance Contract First

Session test cases cannot have reliable expected results until the product policy is explicit.

Define Session Acceptance Contract
Contract elementQuestion to answer
Session creationWhich authentication event creates the session, and must the identifier rotate?
BindingWhich identity, role, tenant, device or assurance level belongs to the session?
Idle timeoutWhich user actions reset inactivity, and which background events do not?
Absolute timeoutWhat is the maximum age regardless of activity?
RenewalWhen is the session identifier rotated, and how long may old and new values overlap?
WarningIs the user warned before expiration, and can activity or reauthentication extend the session?
Expired stateWhat should the browser, API and session store each report?
Remember meDoes it preserve a session, preserve only a reauthentication hint, or issue a new limited session?
Tabs and contextsWhich contexts share one session and which remain independent?
Concurrent devicesHow many active sessions are allowed, and which session is removed when the limit is reached?
RevocationWhich events revoke the current session, all sessions or selected sessions?
ReauthenticationWhich credential or factor is required, and which timers reset after success?
FederationHow do application and identity-provider sessions interact?
EvidenceWhich browser, API, cache, token and session-store observations prove the result?

Example session acceptance contract

Define Session Acceptance Contract
Input stateExpected browser resultExpected system result
Active session below idle limitProtected page remains usableServer accepts the current session
Inactive session at or beyond idle limitWarning, redirect or reauthentication UI follows policyOld session is no longer accepted
Active session reaches absolute limitReauthentication is requiredActivity does not extend the old session
Renewal threshold reachedUser remains in the permitted workflowNew session secret is issued and the old one becomes unusable after the allowed overlap
Remember-me evidence exists after session expiryProduct follows the documented convenience flowNo expired authenticated session is resurrected
Password changes in another deviceCurrent browser reacts according to revocation policyIntended sessions are invalidated
Reauthentication succeedsUser resumes the permitted destination or operationA fresh session or assurance state is created

Model the Complete Session Lifecycle

Session state model from authentication and active use through renewal, idle timeout, absolute timeout, revocation and fresh authentication
Session state model from authentication and active use through renewal, idle timeout, absolute timeout, revocation and fresh authentication

A session is a state machine with several independent timers and termination paths.

  1. Anonymous or pre-authentication state
  2. Authentication accepted
  3. Authenticated session created or rotated
  4. Active use
  5. Inactivity timer reset by documented user activity
  6. Session secret renewed
  7. Step-up or reauthentication performed
  8. Idle timeout reached
  9. Absolute timeout reached
  10. Security event revokes session
  11. User or administrator terminates session
  12. Expired or revoked state
  13. Protected requests rejected
  14. Browser state cleared or ignored
  15. Safe public or reauthentication state
  16. Fresh authentication creates a new session

Define prohibited transitions:

Prohibited session transitions
StateMust not transition to
Expired tokenProtected resource
Background polling onlyIndefinitely active user session
Old token after renewalLong-lived parallel session
Remember-me cookiePrivileged authenticated state without the documented authentication step

Session Creation, Binding and Rotation Test Cases

Session Creation Rotation
IDScenarioExpected resultEvidence
SES-01Authenticate and compare the anonymous and authenticated session identifiersThe authenticated session is newly created or safely rotated according to policyCookie/token comparison and session-store record
SES-02Authenticate as User A after an anonymous browsing or cart sessionAnonymous state is preserved only where intended and becomes bound to User A without fixationOld/new identifiers, cart state and final identity
SES-03Sign out one user and authenticate as another in the same browserNo identity, tenant, permissions or cached data from the previous user remainsUI, API responses, storage and final identity
SES-04Authenticate in two browser contexts using different usersEach context remains isolated and maps to its intended identityContext cookies, session IDs and protected data
SES-05Authenticate through password and federated entry pointsEvery supported authentication method establishes the documented application sessionRedirect chain, assertion time and RP session state
SES-06Refresh immediately after session creationThe session remains valid without duplicate creation or identity lossRequest count, token and final page
SES-07Open a protected route in a new tab after authenticationThe tab recognises the intended shared browser sessionProtected response and identity
SES-08Attempt to force a known pre-authentication session identifierAuthentication does not preserve an attacker-controlled session as the authenticated sessionPre/post identifier and replay result
SES-09Upgrade role, tenant or assurance level within an active sessionThe session is rotated or updated according to policy and stale privilege state is not retainedToken claims, session store and resource access

Idle Session Timeout Test Cases

Idle Timeout Test Cases
IDScenarioExpected resultEvidence
SES-10Remain inactive until immediately before the idle limitThe session remains valid and does not expire earlyControlled server time and protected response
SES-11Remain inactive until the exact configured idle boundaryBoundary behaviour follows one documented inclusive or exclusive ruleServer timestamp and response
SES-12Remain inactive just beyond the idle limitThe session is rejected and cannot access protected resourcesProtected response and session-store status
SES-13Perform a documented user action before the idle limitThe inactivity timer resets from the accepted activity eventLast-activity value and later boundary result
SES-14Move the mouse or press a key without sending a server requestThe timer resets only if the product explicitly treats and reports this as activityNetwork log, client event and server last-activity time
SES-15Modify client clock, cookie expiry or local timeout dataClient manipulation does not extend a server-enforced sessionServer response and session-store expiry
SES-16Reuse the expired token in a direct protected API requestThe server rejects it and returns no protected dataHTTP response, session-store state and audit event
SES-17Restore an old browser cookie or local-storage value after timeoutThe previous session remains unusableRestored value and protected request
SES-18Use Back after idle timeoutCached protected content is not treated as a live authenticated state and sensitive actions cannot be submittedHistory view, reload, network and form submission
SES-19Receive a pre-timeout warning and choose continue or reauthenticateThe warning timing, focus, countdown and extension behaviour match policyTimer, accessibility tree and final expiry

OWASP requires timeout enforcement on the server and recommends testing that old session values cannot be restored or replayed after expiration.

Absolute Timeout Test Cases

Absolute Timeout Test Cases
IDScenarioExpected resultEvidence
SES-20Continuously perform accepted activity until the absolute lifetimeThe session expires or requires reauthentication despite activityCreation time, current time and protected response
SES-21Test immediately before, at and after the absolute boundaryOne precise maximum-age rule is applied consistentlyControlled clock and three responses
SES-22Renew the idle timer repeatedly near the absolute limitIdle resets do not move the absolute deadlineLast-activity and absolute-expiry values
SES-23Open a long-running workflow before the absolute limit and submit after itThe operation follows the documented reauthentication or safe-failure policySubmission response, stored result and session state
SES-24Complete successful reauthentication before the absolute limitThe permitted timers reset according to policy and a fresh assurance event is recordedAuthentication time, session values and audit event

NIST distinguishes overall and inactivity timeout. Activity resets inactivity, while successful reauthentication may reset both; when either applicable timeout expires, the session must terminate.

Renewal and Sliding-Expiration Test Cases

Session Renewal Sliding Expiration
IDScenarioExpected resultEvidence
SES-25Reach the configured renewal threshold while actively using the applicationA new session secret is issued without losing identity or permitted workflowOld/new tokens and current page
SES-26Send simultaneous requests while renewal occursRequests resolve deterministically without losing updates or creating several uncontrolled sessionsParallel responses and session records
SES-27Replay the old token after the allowed renewal overlapThe old token is rejectedOld-token protected request and session-store state
SES-28Replay the new token before and after renewal completionThe new token becomes authoritative according to one documented transition ruleResponses and rotation timestamps
SES-29Trigger repeated renewal thresholdsThe session rotates as configured without unbounded token accumulationActive token count and issue history
SES-30Remain inactive after a renewal eventRenewal does not incorrectly reset idle or absolute time unless policy says it doesTimer values and timeout result
SES-31Use a refresh token or silent renewal after the server session is expired or revokedToken refresh cannot resurrect an invalid sessionRefresh response and protected API result
SES-32Interrupt the network during rotation and reconnect with old client stateThe client recovers safely or requires authentication; it does not create a split-brain sessionStored tokens, retry requests and final identity

Remember Me and Persistent Session Test Cases

Remember Me Test Cases
IDScenarioExpected resultEvidence
SES-33Authenticate without selecting remember me and restart the browserPersistence follows the non-remembered policyCookie persistence and next launch
SES-34Authenticate with remember me and restart the browserThe product follows the documented convenience flow without reviving an expired sessionPersistent token, reauthentication and final assurance
SES-35Allow the normal authenticated session to expire while remember-me evidence remainsThe expired session is rejected; any new access uses the documented fresh-session flowOld-token response and new session creation
SES-36Use remember-me evidence on another account in the same browserEvidence remains account-specific and cannot attach to the wrong identityStored values and final identity
SES-37Copy remember-me data to another browser context or deviceBinding and risk policy are enforced; privileged access is not granted silentlyCopied value, device context and authentication result
SES-38Change password, replace MFA, revoke devices or report compromiseRemember-me evidence is revoked where the security policy requires itOld persistent token and next visit

Multiple Tabs, Background Activity and Offline Test Cases

Tabs Background Offline
IDScenarioExpected resultEvidence
SES-39Leave Tab A idle while Tab B performs documented user activityShared-session idle behaviour matches the contract across both tabsRequests, shared session and both tab states
SES-40Generate only automatic polling, analytics, heartbeat or WebSocket trafficBackground traffic does not reset user inactivity unless explicitly defined as user activityNetwork events and server last-activity value
SES-41Enter data in a form without a server request until timeoutThe session expires according to server activity rules and the form has a safe recovery pathNetwork log, warning and saved/unsaved data
SES-42Let a multi-step workflow time out at each server-interacting stepEvery step handles the expired state without unhandled errors, duplicate records or partial privilegeStep responses and persisted records
SES-43Begin an upload or long request before expiry and complete after expiryThe operation is accepted, cancelled or requires reauthentication according to one documented atomicity ruleRequest timing, final record and session status
SES-44Disconnect the network before timeout and reconnect after itQueued or retried requests do not use the expired session successfullyOffline queue, retry responses and final page
SES-45Let the session expire while an SPA remains openProtected data stops refreshing, errors are mapped safely and cached state is not presented as current accessAPI/WebSocket responses and rendered state
SES-46Close and restore tabs or restore the browser session after server expiryRestored pages cannot re-establish the invalid sessionRestored storage and protected requests

Concurrent Session and Device Test Cases

Concurrent Session Test Cases
IDScenarioExpected resultEvidence
SES-47Authenticate the same account on two permitted devicesBoth sessions remain independent and visible according to policySession list, identifiers and device metadata
SES-48Exceed the configured maximum number of sessionsThe intended oldest, newest or selected session is rejected according to policySession list and each device result
SES-49Perform activity on Device A while Device B remains idleOnly the intended session's idle timer resets unless policy explicitly links themPer-session last-activity values
SES-50Reach the absolute timeout on one device before anotherEach session expires according to its own creation and reauthentication timePer-session timestamps and results
SES-51Use active-session management to terminate one selected deviceOnly the selected session is revoked and cannot be replayedSession list, old token and remaining devices
SES-52Authenticate from a new location, network or deviceNotification, risk response and concurrent-session behaviour follow documented policyAudit event, notification and active sessions
SES-53Create application and identity-provider sessions with different lifetimesThe relying party remains authoritative for its own protected session and handles silent IdP assertions according to policyRP/IdP timestamps and redirect result
SES-54Terminate the identity-provider session while the application session remains active, and vice versaThe independent-session policy is explicit and no false assumption of global termination is madeBoth session states and re-entry flow

Concurrent sessions are not automatically a defect. The defect is an undocumented or unenforced policy, missing user visibility, or failed termination of selected sessions.

Session Revocation and Reauthentication Test Cases

Session Revocation Reauthentication
IDScenarioExpected resultEvidence
SES-55Change the password from the current or another sessionCurrent, all or selected sessions are revoked exactly as documentedOld tokens across devices and audit event
SES-56Disable, suspend or deprovision the accountProtected requests stop working across the intended active sessionsAccount state, API responses and session store
SES-57Replace MFA, revoke trusted devices or report account compromiseSession and remember-me revocation follows the security-event policyOld tokens, persistent evidence and notifications
SES-58Administrator revokes all sessionsEvery active session becomes unusable and cannot refresh itselfSession list, old tokens and refresh attempts
SES-59Attempt reauthentication with wrong, expired or insufficient proofThe protected action remains blocked and the base session follows policyChallenge response, assurance level and action result
SES-60Successfully reauthenticate after timeout or for a sensitive actionA fresh permitted session or assurance state is created; the invalid old session remains unusableOld/new identifiers, authentication time and protected result

The Most Important Session Failure Patterns

Session failures including browser-server disagreement, background polling, absolute timeout bypass, token overlap, lost form data and partial revocation
Session failures including browser-server disagreement, background polling, absolute timeout bypass, token overlap, lost form data and partial revocation

The browser says expired, but the API still accepts the token

A client-side timer or redirect can create a false sense of security. Replay the token against representative protected APIs and inspect the server-side session record.

Background polling prevents idle expiration

Analytics, heartbeats, WebSocket messages, autosave and data refresh can look like activity to the server even when the user has left. Define user activity separately from application traffic.

One tab resets the timer for unrelated contexts

Tabs may share one browser session, but devices and independent contexts usually require separate timers. Verify the intended scope of each activity event.

Frequent activity defeats the absolute timeout

A rolling inactivity timer is not an absolute lifetime. Persist the session through repeated activity and confirm the maximum age still ends or reauthenticates it.

Old and new tokens remain valid after renewal

A short overlap may be necessary for concurrent requests, but unlimited overlap turns rotation into session duplication. Test the exact transition window.

The user loses unsaved work without a safe recovery path

Security does not require silent data loss. Long forms and multi-step workflows need warning, draft preservation, reauthentication or an explicit safe failure.

Remember me silently recreates a privileged session

Persistent evidence should follow a documented authentication policy. It must not convert an expired or revoked session into indefinite privileged access.

Revocation reaches one device but not the others

Password changes, account compromise and administrator actions require an explicit scope. Test every active session, refresh path and persistent token in that scope.

How to Automate Long Session Timeouts Without Waiting in Every Test

A one-hour production timeout does not require every regression test to wait for one hour. Separate mechanism testing from configuration-integrity testing.

Automate Long Timeouts
Test layerTechniqueWhat it proves
Fast mechanism testsRun the application in an isolated test environment with short but real idle, absolute and renewal valuesTimer transitions, browser behaviour, server invalidation and recovery mechanics
Controlled-time testsUse an application clock abstraction or test-controlled session-store timestampsPrecise before/at/after boundaries without wall-clock delays
Direct invalidation testsExpire or revoke the current test session through an explicit isolated test fixtureBrowser/API behaviour after the server has invalidated the session
Configuration-integrity testRead or verify the deployed timeout configuration against the approved environment policyThe environment uses the intended duration rather than only a short test value
Scheduled real-duration checkRun a small number of production-like duration tests outside the main regression pathWall-clock integration and infrastructure behaviour

Do not create a production bypass. A test-only clock, short policy or session fixture must be isolated and unavailable in production. Do not add a query parameter, magic header, browser-only function or hard-coded user that bypasses session enforcement.

For every accelerated case, preserve the same state transition:

  1. Active session
  2. Controlled passage of idle or absolute time
  3. Server marks session expired
  4. Protected request is rejected
  5. Browser maps the expired state
  6. Reauthentication creates a fresh session

What Each Testing Layer Can Prove

Session Testing Layers
LayerWhat it can verifyWhat it cannot prove alone
Browser testWarnings, redirects, forms, Back behaviour, tabs, persistence, recovery and visible identityServer invalidation, all APIs or session-store truth
Protected API testExpired-token rejection, refresh behaviour, status codes and protected-data absenceComplete browser UX and cache behaviour
Session-store or identity-service testCreation, last activity, absolute expiry, renewal, revocation and concurrent-session recordsThat the browser applies the state correctly
Gateway and background-channel testWebSocket, SSE, polling, upload and long-request behaviour at expiryUser-facing recovery
Cache and storage inspectionSensitive browser cache, cookie and local-storage transitionsThat the server rejects replay
Federation testRP/IdP session independence, authentication age and silent assertion behaviourLocal application state outside the federation flow
Accessibility evaluationWarning announcements, focus, countdown, reauthentication and preserved form contextServer-side policy
Security reviewFixation, replay, tampering, hijacking and revocation weaknessesEveryday usability and workflow correctness

Automating Session Management Test Cases

Separate the reusable browser journey from the timer policy and expected server state.

  1. Authenticate as {{USER}}
  2. Capture {{SESSION_ID}}
  3. Record {{SESSION_CREATED_AT}}
  4. Set or wait for {{SESSION_CONDITION}}
  5. Perform {{ACTIVITY_OR_REQUEST}}
  6. Assert {{BROWSER_STATE}}
  7. Assert {{API_RESULT}}
  8. Assert {{SESSION_STORE_STATE}}
  9. Assert {{OLD_TOKEN_REPLAY}}
  10. If required, reauthenticate
  11. Assert {{NEW_SESSION_ID}}
  12. Assert {{RESTORED_DESTINATION}}

Idle-timeout dataset

{
  "name": "idle_timeout_rejects_browser_and_api",
  "policy": {
    "idleSeconds": 60,
    "absoluteSeconds": 600
  },
  "activity": "none",
  "advanceSeconds": 61,
  "expected": {
    "browserState": "reauthentication-required",
    "apiStatus": 401,
    "oldSessionState": "expired",
    "oldTokenReplayAccepted": false
  }
}

Absolute-timeout dataset

{
  "name": "user_activity_cannot_extend_absolute_lifetime",
  "policy": {
    "idleSeconds": 60,
    "absoluteSeconds": 180
  },
  "activity": {
    "type": "accepted-user-request",
    "everySeconds": 30
  },
  "advanceSeconds": 181,
  "expected": {
    "sessionState": "expired",
    "protectedRouteAccessible": false,
    "reauthenticationRequired": true
  }
}

Renewal dataset

{
  "name": "old_token_rejected_after_rotation_overlap",
  "policy": {
    "renewAfterSeconds": 90,
    "overlapSeconds": 5
  },
  "expected": {
    "newTokenIssued": true,
    "oldTokenAcceptedDuringOverlap": true,
    "oldTokenAcceptedAfterOverlap": false
  }
}

Use names based on the session condition and protected outcome, not session_test_4 or timeout_negative_2.

What Browser Automation Should Not Claim

  • session identifiers have sufficient entropy
  • cookies and tokens are cryptographically protected against every attack
  • all token-signing and validation implementations are secure
  • distributed session stores remain consistent under every infrastructure failure
  • all session hijacking techniques are prevented
  • revocation propagates within every production latency objective
  • identity-provider and relying-party protocol conformance is complete
  • mobile native secure storage is correctly implemented
  • all browser-cache and service-worker edge cases are absent
  • production timeout values are correct unless configuration integrity is checked separately

Browser automation is still essential because it proves the real user journey and detects disagreements between visible state, protected requests, tabs, storage and reauthentication.

Session Management Testing Checklist

  • authentication creates or safely rotates the session identifier
  • the session resolves to the correct user, tenant, role and assurance level
  • idle and absolute timeout values are documented separately
  • before, at and after boundary cases are tested with server time
  • only documented activity resets inactivity
  • mouse movement or typing without a request follows the intended policy
  • polling, analytics, heartbeat and WebSocket traffic cannot silently simulate user presence
  • client clock, cookie expiry or local storage cannot extend server lifetime
  • expired tokens fail in representative protected APIs
  • restored old tokens and browser history cannot revive the session
  • warnings are timed correctly, accessible and consistent across pages
  • continuous activity cannot defeat the absolute timeout
  • long forms, uploads and multi-step workflows have deterministic expiry behaviour
  • session renewal rotates secrets and limits old/new overlap
  • refresh mechanisms cannot resurrect an expired or revoked session
  • remember-me evidence remains separate from the expired authenticated session
  • remember-me state is account-specific and revocable
  • tabs and independent browser contexts follow the documented sharing policy
  • offline queued requests fail safely after server expiry
  • restored tabs and SPA caches do not present stale protected state as live access
  • concurrent sessions follow the documented count and eviction policy
  • activity and timeout are tracked per intended session or device
  • users can view and terminate selected active sessions when the product provides that control
  • password change, account disablement, factor replacement and compromise events revoke the intended sessions
  • reauthentication failure leaves protected actions blocked
  • successful reauthentication creates a fresh permitted session or assurance state
  • accelerated tests are isolated from production
  • a separate configuration check verifies the deployed timeout values

Final acceptance criterion. Do not accept: “After 15 minutes, the login page appeared.” Accept: “At the documented boundary, the server rejected the old session across protected APIs and relevant contexts, background traffic could not keep it alive, pending work followed policy, and restored access required a fresh permitted authentication event.”

Frequently Asked Questions

What are the most important session timeout test cases?

Test immediately before, at and after the idle limit; replay the expired token against protected APIs; test activity classification, absolute lifetime, multiple tabs, background requests, pending forms, revocation and fresh reauthentication.

What is the difference between idle and absolute timeout?

Idle timeout is based on the time since accepted activity. Absolute timeout limits the total session age regardless of activity. They require separate timers, boundary cases and expected results.

Should activity in another tab reset the timeout?

It depends on whether the tabs share one browser session and whether that request qualifies as user activity. The product must define the scope; the test should not assume either outcome.

How can a one-hour timeout be automated?

Use short real values or controlled server time for frequent mechanism tests, verify deployed configuration separately, and reserve a small scheduled set for real-duration production-like checks.

No. The server must reject the old identifier. Restoring or replaying it against protected APIs is the stronger proof.

Is remember me the same as a long session?

Not necessarily. A safer design may store limited persistent reauthentication evidence and create a new session later. Test the actual policy rather than assuming the old authenticated session remains alive.

Automate the Repeatable Session Journey

Reusable session automation flow with idle, absolute, renewal, remember-me, concurrent-session and revocation datasets
Reusable session automation flow with idle, absolute, renewal, remember-me, concurrent-session and revocation datasets

WrightTest lets teams record the browser part of a session flow, replace fixed users and timing policies with named datasets, run scenarios independently, and inspect screenshots, step results, errors and Playwright traces.

  1. Which user and session started the test
  2. Which timer or security event changed the state
  3. Which browser action crossed the boundary
  4. Whether the protected request was accepted or rejected
  5. Whether other tabs or devices agreed
  6. Whether the old token remained reusable
  7. Whether reauthentication created a fresh session
  8. Where a failed journey stopped

Use controlled time, isolated session fixtures and API assertions for states that should not require long wall-clock waits. Keep at least one configuration-integrity check and a small production-like duration suite.

Browser checks can be exported to Playwright .spec.ts files when they need to move into an existing repository or CI pipeline.

Continue with Authentication Testing

Session management is one part of the complete authentication lifecycle. Use the Authentication Testing guide to plan coverage across primary login, additional factors, session state and termination.