> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shiftlabs.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Results

> Analyze load test results with detailed metrics and visualizations

The Test Results page provides comprehensive analysis of all load test executions. View aggregate statistics, drill into individual tests, compare results, and set performance baselines.

## Key Metrics

<CardGroup cols={2}>
  <Card title="Latency Percentiles" icon="gauge">
    Response time distribution: P50, P90, P95, P99 show how fast most requests complete.
  </Card>

  <Card title="Error Rate" icon="triangle-exclamation">
    Percentage of failed requests. Low error rates indicate stable performance under load.
  </Card>

  <Card title="Throughput" icon="arrows-rotate">
    Requests per second your system handles at the configured load level.
  </Card>

  <Card title="Success Rate" icon="check-circle">
    Percentage of requests returning expected status codes (typically 2xx/3xx).
  </Card>
</CardGroup>

## Results List

The main Test Results page displays all test executions in a searchable, filterable table.

### Table Columns

| Column        | Description                               |
| ------------- | ----------------------------------------- |
| **Test ID**   | Unique identifier (click to view details) |
| **Test Name** | Name from the associated test plan        |
| **Location**  | Geographic origin (country flag)          |
| **Provider**  | Proxy provider used for the test          |
| **VUs**       | Number of virtual users                   |
| **Duration**  | Total test duration                       |
| **Requests**  | Total requests made                       |
| **Created**   | Test execution timestamp                  |

### Filtering and Search

* **Search**: Filter by test ID, name, provider, or country
* **Provider Filter**: Show only tests from specific providers
* **Country Filter**: Show only tests from specific locations

## How to View Test Details

<Steps>
  <Step title="Find the Test">
    Use search or filters to locate the test in the results list.
  </Step>

  <Step title="Click the Test ID">
    Click the test ID link to open the detailed results page.
  </Step>

  <Step title="Explore Tabs">
    Use the tabs to view different aspects of the test results.
  </Step>
</Steps>

## Test Detail Page

The detail page provides comprehensive analysis with six tabs.

### Header Information

The header displays:

* **Status**: SUCCESS, FAILED, RUNNING, or PENDING
* **Multi-Step Badge**: Shown for multi-step scenario tests
* **Baseline Badge**: Shown if this test is set as the performance baseline
* **Quick Stats**: Total requests, errors, success rate

### Quick Stats Grid

Eight cards showing key performance indicators:

| Metric          | Description                   |
| --------------- | ----------------------------- |
| **Requests**    | Total number of HTTP requests |
| **Errors**      | Number of failed requests     |
| **Error Rate**  | Percentage of failures        |
| **Avg Latency** | Mean response time            |
| **P50 Latency** | Median response time          |
| **P90 Latency** | 90th percentile response time |
| **P95 Latency** | 95th percentile response time |
| **P99 Latency** | 99th percentile response time |

### Summary Tab

The default view showing:

* **Test Info Cards**: Detailed test configuration (URL, method, VUs, duration, executor, thresholds)
* **Latency Chart**: Response time distribution over time
* **Status Pie Chart**: Distribution of HTTP status codes
* **Outliers Chart**: Visualization of slow requests

### Steps Tab (Multi-Step Only)

For multi-step tests, this tab shows:

* Results for each step in the scenario
* Per-step metrics (latency, success rate)
* Extracted variables and assertion results
* Step execution order and timing

### Metrics Tab

Detailed timing metrics from K6:

| Metric                    | Description                   |
| ------------------------- | ----------------------------- |
| **Iteration Duration**    | Total time per test iteration |
| **HTTP Request Duration** | End-to-end request time       |
| **Connecting Time**       | TCP connection establishment  |
| **TLS Handshake**         | SSL/TLS negotiation time      |
| **Sending Time**          | Time to send request body     |
| **Waiting Time**          | Time to first byte (TTFB)     |
| **Receiving Time**        | Time to receive response      |
| **Blocked Time**          | Time waiting for connection   |

Each metric shows MIN, AVG, and MAX values.

**Export**: Download metrics as CSV or JSON for external analysis.

### Requests Tab

Paginated list of individual requests with:

* Request index and timestamp
* HTTP status code
* Response time
* Request/response details (expandable)

Use this tab to investigate specific slow or failed requests.

### Stats Tab

Large format cards displaying all key metrics with copy-to-clipboard functionality. Useful for reporting and sharing specific values.

### Terminal Tab

Raw K6 output log showing:

* Test execution progress
* Real-time metrics during the run
* Error messages and warnings
* Final summary statistics

## How to Compare Test Results

Compare two test executions to identify performance changes.

<Steps>
  <Step title="Open Test Details">
    Navigate to the test you want to compare from.
  </Step>

  <Step title="Click Compare">
    Click the **Compare** button in the header.
  </Step>

  <Step title="Select Comparison Test">
    Choose another test to compare against. Tests from the same plan are shown first.
  </Step>

  <Step title="Review Comparison">
    The comparison shows metric differences, improvements, and degradations.
  </Step>
</Steps>

<Info>
  Comparison highlights improvements in green and degradations in red, making it easy to spot performance changes between releases.
</Info>

## How to Set a Baseline

Set a test as the performance baseline for regression detection.

<Steps>
  <Step title="Open a Successful Test">
    Navigate to a completed test with good performance.
  </Step>

  <Step title="Click Set as Baseline">
    Click the **Set as Baseline** button in the header.
  </Step>

  <Step title="Confirm">
    The test is now the baseline for its test plan. Future tests are compared against it.
  </Step>
</Steps>

<Tip>
  Set baselines after confirming acceptable performance. Future tests automatically show regression alerts if metrics exceed defined thresholds.
</Tip>

## Understanding Alerts

### Regression Alert

Shown when a test's metrics exceed the baseline thresholds:

* **Warning**: Metrics approaching threshold limits
* **Critical**: Metrics significantly exceeding limits

Review the specific metrics that triggered the alert and investigate root causes.

### Threshold Results

If thresholds were defined in the test plan, results show:

* **Passed**: Threshold conditions met
* **Failed**: Threshold conditions not met
* Individual threshold evaluation with actual vs expected values

### Error Alert

Shown when a test fails with details about:

* Error type and message
* Potential causes
* Troubleshooting suggestions

## Latency Percentiles Explained

| Percentile | Meaning                         | Use Case                  |
| ---------- | ------------------------------- | ------------------------- |
| **P50**    | Median - 50% of requests faster | Typical user experience   |
| **P90**    | 90% of requests faster          | Most users' experience    |
| **P95**    | 95% of requests faster          | SLA target (common)       |
| **P99**    | 99% of requests faster          | Worst case for most users |

<Warning>
  Don't rely only on averages. A low average can hide a long tail of slow requests. Always check P95 and P99 for real user experience.
</Warning>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Test shows FAILED status" icon="circle-question">
    * Check the Terminal tab for error messages
    * Review the Error Alert for specific failure details
    * Common causes: target unreachable, SSL errors, timeout
  </Accordion>

  <Accordion title="High error rate" icon="circle-question">
    * Check the Requests tab for failing status codes
    * Review Status Pie Chart for error distribution
    * Common causes: rate limiting, authentication issues, server errors
  </Accordion>

  <Accordion title="Unexpected latency spikes" icon="circle-question">
    * Check the Outliers Chart for specific slow requests
    * Review the Latency Chart for patterns over time
    * Consider network distance (test location vs server)
  </Accordion>

  <Accordion title="Missing metrics" icon="circle-question">
    * Test may still be processing results
    * Refresh the page after a few seconds
    * Very short tests may have limited metric data
  </Accordion>

  <Accordion title="Cannot set as baseline" icon="circle-question">
    * Only successful tests can be baselines
    * The test must belong to a test plan
    * You need write permission for Load Testing
  </Accordion>
</AccordionGroup>

## FAQ

<AccordionGroup>
  <Accordion title="How long are results stored?">
    Test results are stored permanently. There is no automatic cleanup or retention limit.
  </Accordion>

  <Accordion title="Can I delete test results?">
    Individual test results cannot be deleted. This ensures audit trail integrity for performance history.
  </Accordion>

  <Accordion title="What's the difference between P95 and P99?">
    P95 means 95% of requests were faster than this value. P99 is more stringent - 99% faster. P99 catches edge cases that P95 might miss.
  </Accordion>

  <Accordion title="Why is my average latency low but P99 high?">
    This indicates a "long tail" - most requests are fast, but some are very slow. Investigate outliers in the Requests tab.
  </Accordion>

  <Accordion title="How do I share results with my team?">
    Copy the URL from the detail page - it includes the test ID and can be shared directly. Or export metrics as CSV/JSON.
  </Accordion>

  <Accordion title="What triggers a regression alert?">
    When metrics exceed the baseline's thresholds. Default thresholds compare latency, error rate, and success rate.
  </Accordion>
</AccordionGroup>
