Reproduction scenarios and investigation findings

Reproduction scenarios and investigation findings

From the customer’s evidence to a test engineering can run, and to hypotheses the investigation can test.

Once a Connect session has evidence (a browser reproduction, failed requests from the recorder or failing agent checks), two things happen on the session: Reproduction scenarios turn it into tests, and What the investigation learned turns it into findings and hypotheses. Neither makes a model call; both are built from recorded evidence by fixed rules.

1. Generate a scenario

Generate from evidence builds a scenario from the latest browser reproduction record, the failed requests seen in the browser and by the agent, console errors, screenshots, the environment and versions, and the links between browser and server evidence. It contains:

  • a summary, the preconditions (a test environment, a test user with the same role — never the customer’s account), the environment and versions;
  • the steps, with the expected and actual result and the failure point;
  • the failing requests, with their correlation IDs and which source saw them;
  • a confidence level with the reasons behind it (reproduced or not, server evidence linked, contradictions, how many steps and requests).

Personal data in addresses, step text and messages is replaced with safe test values, and the scenario lists what was replaced.

Generated artifacts

ArtifactWhat you get
PlaywrightA test that follows the steps and asserts the expected result. Recommended unless your repository only uses Cypress (from the code index).
CypressThe same test for Cypress.
API scriptA Node script calling the failing endpoints and checking the status.
HTTP fileRequests for VS Code / JetBrains HTTP clients, with {{baseUrl}} and {{token}}.
PostmanA Postman v2.1 collection with variables.
Manual stepsA numbered checklist for a person to follow.

All of them read addresses and credentials from environment variables (BASE_URL, TEST_USER, TEST_PASSWORD, API_TOKEN). Steps that change data are marked; run them only against test data.

Warning:A generated test is unverified until someone records an execution. TicketResolve never runs it on its own infrastructure, and never claims it passes or fails before it has been run.

2. Edit and approve

  • Edit any artifact; saving creates a new version. Anything that looks like a real key or token is refused: use an environment variable instead.
  • Approve a version to keep it as the original failure for before / after verification. Approving a new version supersedes the earlier approval.
  • An edited version is approved by someone other than the person who edited it.

3. Add the test to the fix

Add test to the fix proposal puts the approved Playwright or Cypress test into the investigation’s fix proposal, at tests/e2e/ticketresolve/<ticket>-repro.spec.ts (or cypress/e2e/ticketresolve/…cy.ts). The proposal goes back to review before its draft pull request is opened or updated. Nothing is merged or deployed from here.

4. Record executions

Record each run of the approved test: where it ran, when, and what happened.

FieldValues
Environmentci, staging, production, customer, local
Phasepre_fix, post_fix, post_deploy
Resultfailure_reproduced, passed, error
LinkOptional https link to the run (for example the CI job)

Each execution names its environment: a pass in staging is not a pass in production. Send an idempotencyKey from CI so a retried call isn’t counted twice.

5. What the investigation learned

When a session linked to an investigation finishes, or when you click Analyse evidence, TicketResolve records:

  • Observed: failed requests and exceptions in the customer’s browser, failing agent checks, and the failing step of the reproduction;
  • Browser ↔ server: browser evidence linked to logs, traces or agent checks by request or trace ID, or by endpoint and time (inferred);
  • Deployments in the six hours before the first failure, labelled as timing only, never as a cause;
  • affected endpoints and services, and where the sources disagree;
  • Hypotheses to test, ranked by the evidence behind them, each with supporting and contradicting evidence and a test to run;
  • what is missing and the next diagnostic action.

Hypotheses are added to the investigation as suspected, with their evidence links, and the analysis goes on the investigation’s audit trail. A root cause is only confirmed by a person on the investigation; customer-collected evidence can be misleading and correlation is not causation.

API

  • POST /api/trial/:id/connect/sessions/:sid/scenarios { browserReproId? }, GET …/sessions/:sid/scenarios
  • GET /api/trial/:id/connect/scenarios/:scid, POST …/:scid/edit { artifacts?, summary?, expected?, note? }, POST …/:scid/approve, POST …/:scid/add-to-fix { framework? }
  • GET|POST …/scenarios/:scid/executions { environment, phase, result, detail?, url?, idempotencyKey? }
  • GET /api/trial/:id/connect/sessions/:sid/findings, POST …/sessions/:sid/analyse