Loading challenge...
Add assertions to load tests
Add assertions to your load tests to validate response correctness
Choose assertions to run
Copy to your load test
import http from 'k6/http';
import { check } from 'k6';
export default function() {
const res = http.get('https://api.example.com/data');
check(res, {
'Status is 200': (r) => r.status === 200,
});
}Automation hints