- Documentation
- Learning Hub
- Module 3 of 4 Establishing a baseline
Checks vs thresholds
Slide 5 of 9
Two layers of validation
Checks: per-request correctness
Checks are assertions that validate each response. They don’t stop the test on failure.
check(res, {
'status is 200': (r) => r.status === 200,
'body is not empty': (r) => r.body.length > 0,
});Thresholds: whole-test pass/fail
Thresholds are pass/fail criteria for the entire test. They evaluate aggregate metrics.
thresholds: {
http_req_duration: ['p(95)<500'],
http_req_failed: ['rate<0.01'],
checks: ['rate>0.99'],
}