Reshot

Context testing use case

Test Across Roles, Locales, Themes, and Viewports

Select meaningful Product Journey contexts across authority, plan, data, locale, theme, device, motion, and clock without creating a Cartesian explosion.

To Test Across Roles, Locales, Themes, and Viewports, define the product conditions that can change an outcome, select representative context cells from risk and meaning, and preserve what was selected, skipped, unsupported, and observed.

Start from outcome differences

Add a context only when it can change authority, sequence, content, layout, interaction, accessibility, side effects, or completion. A member and owner may have different permission boundaries. French mobile dark mode may change copy, formatting, layout, and visible focus.

State Capsule dimensions

Declare actor, role, account scope, plan, data, flags, authentication, locale, timezone, theme, viewport, device scale, reduced motion, fixed/bounded clock, dependencies, network policy, and permitted side effects.

Store secret references, not values.

Avoid Cartesian explosion

Three roles × four plans × eight locales × two themes × six viewports already creates 1,152 cells. Select from:

  • authority and safety boundaries;
  • changed code/feature impact;
  • high-value or high-risk outcomes;
  • structurally different layouts/languages;
  • known barriers and incidents;
  • supported browser/device policy;
  • representative customer/product use where permissioned.

Record exclusions honestly.

Projects and native execution

Playwright projects can represent browsers, devices, environments, and authenticated states. Preserve native configuration. Bind the selected native result to the Journey context instead of duplicating every setting in another runner.

Evidence

Every executed cell keeps Run, attempt, step, Observation, and peer evidence identity. Only compare visual baselines with compatible context hashes. A mobile French frame is not noise against an English desktop baseline.

Coverage

Track verified contexts against planned meaningful contexts. Keep outcome, Decision, and downstream-lineage coverage separate. A large matrix with no current Decision is not release readiness.

Failure handling

Role mismatch is state/authorization, not flakiness. Missing localized target may be target or product failure. Font/layout variation may be visual nondeterminism or real presentation change. Classify before retry or baseline update.

Pairwise and risk-based selection

Use pairwise techniques for low-risk independent dimensions, but always include known interactions and authorization boundaries explicitly. A pairwise plan that omits the one role/plan combination controlling a destructive action is not representative.

Recalculate the plan after material Journey or State Capsule change. Preserve the policy/version that selected each cell.

Localization evidence

Verify translated control names, formatting, direction, copy reflow, truncation, input method, and outcome meaning. A translated screenshot does not establish that the underlying workflow or server response uses the intended locale.

Keep locale-specific baselines and editorial Review where product meaning differs.

Theme and viewport evidence

Control system color scheme, application theme, fonts, scale, and motion. Test layout containment, fixed/sticky regions, focus visibility, overlays, scrolling, and touch target behavior. Do not compare intentionally different themes as visual regressions.

Multi-actor Journeys

Invitations, approval, support handoff, and collaboration can require several isolated sessions in one outcome. Identify actor per step and shared side effects. Each context cell must preserve exact account/role identity and cleanup.

Reporting

Show context ID, disposition, reason, attempt, evidence status, and Decision. Separate coverage gaps from failures. Unsupported means the product or runner cannot support the cell; skipped means policy selected another representative cell.

Version the selection policy and retain why each representative cell exists. When product usage or risk evidence changes, update the policy rather than silently adding ad hoc permutations.

Anti-patterns

Avoid “test everything,” duplicated files per permutation, shared mutable accounts, implicit locale/theme, one baseline for incompatible contexts, and coverage percentages that count meaningless cells.

First matrix

Start with a reference owner desktop context, one authority boundary, and one structurally different locale/device context. Run three repetitions where determinism matters. Expand only from evidence.

Use the Journey Coverage Calculator, read Stateful End-to-End Testing, and inspect the three-context internal study.

Start with one release-critical Journey.

Define the outcome, declare its state, run it, inspect the evidence, and record the Decision before expanding coverage.