Performance
Response time, throughput, and Lighthouse-based performance metrics integrated into your test runs.
What this module tests
The Performance module measures and asserts on your application's performance characteristics. Rather than load testing, this module focuses on baseline performance validation — ensuring each release meets defined performance budgets. Tests cover:
- API response times — p50, p95, p99 latency per endpoint
- API throughput — requests per second at defined concurrency levels
- Web page performance metrics — Lighthouse scores (Performance, LCP, FID/INP, CLS, TTFB)
- Performance regression detection — alerting when metrics degrade beyond threshold vs. baseline
Metrics reference
| Metric | Applies to | Default threshold |
|---|---|---|
| Response time p95 | API | 2000ms |
| Response time p99 | API | 5000ms |
| Throughput | API | No default — set per scenario |
| Lighthouse Performance score | Web | ≥ 70 |
| LCP (Largest Contentful Paint) | Web | ≤ 2500ms |
| CLS (Cumulative Layout Shift) | Web | ≤ 0.1 |
| TTFB (Time to First Byte) | Web | ≤ 800ms |
Default thresholds can be overridden per project in Project Settings → Performance Thresholds or per scenario using max_response_ms and min_throughput_rps KB fields.
KB scenario format for performance tests
# Performance scenario examples
domain: products-api
scenarios:
- id: PERF-API-001
title: "GET /products responds within 500ms at p95"
module: performance
endpoint: /api/v1/products
method: GET
max_response_ms: 500
steps:
- Send GET to /api/v1/products with valid auth
expected: >
HTTP 200 within 500ms at p95 latency.
p99 latency below 1000ms.
domain: homepage
scenarios:
- id: PERF-WEB-001
title: "Homepage Lighthouse performance score ≥ 80"
module: performance
steps:
- Navigate to / (homepage)
- Wait for page to be fully loaded
expected: >
Lighthouse Performance score ≥ 80.
LCP ≤ 2500ms.
CLS ≤ 0.1.
Performance baselines and regression alerts
After the first run, VigilQA records performance baselines. On subsequent runs, if a metric degrades beyond the configured regression threshold (default: 20% worse than baseline), a performance regression alert is raised. This alert appears in the run results and triggers a notification (if configured).
Performance tests are run serially (not concurrently) by default to avoid resource contention skewing results on the test execution infrastructure. For throughput tests, concurrency is explicitly controlled per scenario.