Like Unit Testing, for Performance

Pass/Fail behavior for easy automation and integration into CI pipelines

Checks
Load
Threshold

5 steps for automated performance testing:

import http from "k6/http";

export default function() {
  const data = {username: 'name', password: 'pw'};
  http.post('https://myapi.com/login/', data);
};

1. Write your load test

Use the k6 Javascript API to write simple or realistic load test.

export let options = {
  thresholds: {
    "http_req_duration": ["p(95)<1000"],
    "failed requests": ["rate<0.1"],
  }
};

2. Configure performance thresholds

- 95th percentile response time must be below 1s.
- Less than 0.1% request errors.

Running the test (100VUs, 2m), please wait...
Test Run Successful
Total thresholds: 2.  Passed: 2.  Failed: 0.

3. Run the test and check the pass/fail status

Test many load configurations to ensure your performance goals in multiple situations.

4. Automate your performance tests

Run your tests frequently to be confident in your system's performance.

Schedule your test execution and integrate your tests into CI pipelines.

Performance test

Checkout API. 2 of 4 thresholds failed.

Performance test

Checkout API. 4 of 4 thresholds passed.

5. Receive alerts on performance regressions

Configure your notifications and get alerts if any change breaks your performance goals.