← Back to Home

API Error Context in Failure Diagnosis

Test the feature that captures 5xx server errors and includes them in AI diagnosis prompts.

Network Watcher

Intercepting all fetch requests. Click buttons below to simulate API calls.

Test Scenarios

Mock Test Execution

passedNavigate to login page
goto("/login")
passedEnter credentials
fill("#username", "testuser")
failedClick login button
click("#login-btn")

Network Request Log(0 requests)

No requests captured yet. Click test scenarios to make API calls.

5xx Errors Captured(max 5 recent)

No 5xx errors captured yet.

Feature Flow

Step Fails
Get Network Watcher
Extract 5xx
AI Diagnosis

How This Works

  1. The Network Watcher intercepts all fetch() requests by patching the global fetch function.
  2. When an API call returns a 5xx status code, it's captured and stored.
  3. When a test step fails, the system retrieves the recent 5xx errors (max 5).
  4. These errors are formatted and included in the AI diagnosis prompt context.
  5. The AI can now correctly identify when failures are caused by server errors vs test issues.