Skip to main content
The New Test wizard guides you through configuring and launching load tests. The wizard has four steps: Scenario, Load, Thresholds, and Location.

Key Concepts

Virtual Users (VUs)

Simulated concurrent users making requests. More VUs = higher load on your system.

Load Patterns

How load is applied over time: constant, ramping up/down, fixed iterations, or arrival rate.

Thresholds

Pass/fail criteria based on response times, error rates, or throughput.

Test Location

Geographic origin of the load test, affecting network latency to your servers.

How to Create a Single Request Test

Test a single API endpoint with configurable load.
1

Select Single Request Mode

On the Scenario step, ensure Single Request is selected (default).
2

Configure the Request

  • Select the HTTP method (GET, POST, PUT, PATCH, DELETE)
  • Enter the target URL (e.g., https://api.example.com/users)
  • Click Settings to add headers, query params, request body, or authentication
3

Choose a Load Pattern

Select one of the four load patterns:
  • Constant VUs: Fixed number of users for a set duration
  • Ramping VUs: Gradually increase/decrease users over stages
  • Per VU Iterations: Each user runs a fixed number of requests
  • Constant Arrival Rate: Maintain a fixed request rate regardless of response time
4

Configure Load Settings

Click Next and configure the specific parameters for your chosen pattern.
5

Set Thresholds (Optional)

Define pass/fail criteria like “p95 latency must be under 500ms”.
6

Select Location

Choose the geographic location from the world map.
7

Launch Test

Click Launch Test. The test execution panel shows real-time progress.

How to Create a Multi-Step Test

Chain multiple API requests to test user flows (login → fetch data → submit form).
1

Select Multi-Step Mode

On the Scenario step, click Multi-Step to switch modes.
2

Add Steps

Click Add Step to create each request in the flow. For each step:
  • Name: Descriptive name (e.g., “Login”, “Get User Profile”)
  • URL: The endpoint URL
  • Method: HTTP method
  • Headers/Body: Request configuration
3

Configure Variable Extractors

Extract values from responses to use in subsequent steps:
  • Source: body, header, or status
  • Path: JSONPath expression (e.g., $.data.token)
  • Variable Name: Reference in later steps as {{variableName}}
4

Add Assertions

Validate each step’s response:
  • Status code equals 200
  • Body contains specific value
  • Response time under threshold
5

Continue with Load, Thresholds, and Location

Complete the remaining wizard steps as with single request tests.
In multi-step mode, each virtual user executes all steps in sequence. The total iteration duration includes all steps plus any configured think time between them.

Load Pattern Reference

Constant VUs

Runs a fixed number of virtual users continuously for the specified duration.
ParameterDescriptionExample
VUsNumber of concurrent users10
DurationHow long to run30s, 5m, 1h
Use case: Baseline performance testing, sustained load simulation, capacity planning.

Ramping VUs

Gradually increases or decreases load through defined stages.
ParameterDescriptionExample
StagesList of (duration, target VUs) pairs10s→10, 20s→50, 10s→0
Quick Templates:
  • Linear Ramp: Gradual load increase
  • Spike Test: Sudden load spike then recovery
  • Stress Test: Progressive overload to find breaking point
Use case: Stress testing, finding breaking points, warm-up scenarios.

Per VU Iterations

Each virtual user executes the test script a fixed number of times.
ParameterDescriptionExample
VUsNumber of concurrent users5
IterationsRequests per user100
Total requests = VUs × Iterations. Test ends when all users complete their iterations. Use case: Batch processing tests, finite workload simulation.

Constant Arrival Rate

Maintains a constant rate of new requests regardless of response time.
ParameterDescriptionExample
RateRequests per time unit50
Time UnitPer second or per minute1s
DurationTotal test duration2m
Use case: SLA validation, throughput testing, rate-limited API testing.

How to Configure Request Settings

Click the Settings button to open the configuration drawer.

Query Parameters

Add URL query parameters:
  1. Click Add Parameter
  2. Enter key and value
  3. Parameters are appended to the URL automatically

Headers

Add custom HTTP headers:
  1. Click Add Header
  2. Enter header name and value (e.g., Content-Type: application/json)

Request Body

For POST, PUT, PATCH requests:
  1. Select body type: JSON, XML, or Text
  2. Enter the request body content
  3. JSON is validated before test execution

Authentication

Configure request authentication:
TypeParameters
Basic AuthUsername, Password
Bearer TokenToken value
API KeyKey name, Key value, Pass by (header/query)

Options

OptionDescriptionDefault
Follow RedirectsAutomatically follow HTTP redirectsEnabled
Enable HTTP/2Use HTTP/2 protocol if supportedDisabled
TimeoutRequest timeout in seconds30

How to Set Performance Thresholds

Thresholds define pass/fail criteria for your test.
1

Open Thresholds Step

Navigate to step 3 (Thresholds) in the wizard.
2

Add a Threshold

Click Add Threshold and configure:
  • Metric: What to measure (p50, p90, p95, p99, avg, errorRate, throughput)
  • Operator: Comparison (less than, greater than, equals)
  • Value: Target value
  • Severity: Error (fails test) or Warning (flags but passes)
3

Add More Thresholds

Add multiple thresholds to validate different aspects of performance.
Common threshold examples:
MetricConditionDescription
p95< 500ms95th percentile latency under 500ms
p99< 1000ms99th percentile under 1 second
errorRate< 1%Less than 1% failed requests
throughput> 100At least 100 requests per second
Without thresholds, tests always pass regardless of performance. Add thresholds to automatically detect regressions.

How to Select Test Location

Choose where load originates geographically.
1

View Available Locations

The world map shows all available proxy locations as markers.
2

Select a Location

Click a marker on the map or select from the dropdown list.
3

Consider Proximity

The map shows your target server’s location (if resolvable). Choose a location that represents your actual users.
Test from multiple locations using Multi-Region Tests to understand global performance.

During Test Execution

After clicking Launch Test:
  1. Status Panel: Shows real-time test progress
  2. Live Metrics: Requests, latency, success rate update in real-time
  3. Logs: K6 execution output streams live
  4. Auto-Navigation: Redirects to detailed results when complete
You can navigate away during execution. Return to New Test page to see the active test panel, or check Test Results for completed tests.

Troubleshooting

  • Verify the URL is valid and accessible from the internet
  • Check that authentication credentials are correct
  • Ensure the target server allows requests from proxy IPs
  • Check the target URL is reachable
  • Verify SSL certificates if using HTTPS
  • Review request headers and body format
  • Check for rate limiting or IP blocking on target server
  • Consider the geographic distance between test location and server
  • Check if your server is under load from other sources
  • Review if authentication adds overhead
  • Ensure you’ve switched to Multi-Step mode
  • Each step requires at minimum a name and URL
  • Verify the JSONPath expression is correct
  • Ensure the previous step returns the expected response structure
  • Check that variable names don’t contain special characters

FAQ

You can configure 1 to 1000 virtual users per test. Higher VU counts generate more load but consume more resources.
VUs are concurrent users. Each VU makes multiple requests during the test. Total requests depends on VU count, duration, and response times.
Load tests run from external proxy servers. Internal APIs must be accessible from the internet. For private APIs, consider VPN or expose via secure gateway.
Test results are stored permanently and accessible from Test Results page. You can compare tests and set baselines for regression detection.
Use Test Plans to save configurations and run them on demand or integrate with CI/CD pipelines.
Tests continue running server-side. Return to the New Test page or check Test Results to see status and results.