Skip to main content

Linux VM

Last updated on

Prerequisites

  • Access to the Harness Resilience Testing module
  • A Linux Chaos Infrastructure with load testing enabled
  • An environment created in your project for the infrastructure
  • Target application endpoints accessible from the test infrastructure

Create a Load Test

  1. Navigate to Resilience Testing > Load Testing
  2. Click + New Load Test
Try Sample Test

Click the + New Load Test dropdown and select Try Sample Test to instantly explore the feature with a pre-configured test: sample endpoints, realistic load settings, and example configurations included.

Step 1: Overview

Fill in the test metadata and select your infrastructure:

FieldDescription
NameA descriptive identifier for the test
Description(Optional) What the test validates
Tags(Optional) Labels to organize tests
Target TypeSelect Linux VM to run the load test on a single Linux VM infrastructure
Load Test InfrastructureSelect a Linux Chaos Infrastructure (with load testing enabled) from the dropdown
Load Test TypeSelect Locust (Python-based). JMeter and K6 are coming soon.

The Harness chaos agent on the VM executes the Locust process locally and streams results back to the platform.

  • Best for simple setups, on-premises hosts, or when you need direct network access to internal services
  • See Linux Infrastructure for setup instructions

Click Next to proceed to Test Configuration.

Step 2: Test Configuration

Choose how you want to define the test workload:

Use the visual editor to build HTTP scenarios without writing code. Harness generates the Locust script from your configuration at execution time.

Scenario Definition

Each request represents one HTTP call your virtual users execute on every loop. For each request:

FieldDescription
Request nameOptional label to identify this request in results
HTTP MethodGET, POST, PUT, DELETE, PATCH, HEAD, or OPTIONS
URLFull endpoint URL (e.g., https://api.example.com/users)

Each request has four tabs:

Query Parameters - Key-value pairs appended to the URL as ?key=value&key2=value2.

Headers - HTTP request headers. Common examples: Authorization: Bearer <token>, Content-Type: application/json.

Assertions - Conditions that must be true for the request to count as a success. Failed assertions are recorded as errors in results.

Assertion typeValidates
TextResponse body contains (or does not contain) a specific string
Response TimeRequest completes within a specified threshold (milliseconds)

Extract from Response - Captures a dynamic value from a response (e.g., a login token) and stores it as a variable for use in later requests. Reference extracted values with {{variable_name}}.

Click + to add more requests to the scenario.

Step 3: Load Configuration

Configure how virtual users are ramped up and sustained during the test:

ParameterDescriptionConstraint
Number of UsersPeak concurrent virtual usersMust be a positive integer
Test Duration (seconds)Total test runtimeMust be greater than Ramp-Up Duration
Ramp-Up Duration (seconds)Time to reach peak users from zeroMust be less than Test Duration

Steady-state duration = Test Duration - Ramp-Up Duration.

The Load Profile graph updates in real time as you adjust values. The Load Profile Summary shows a plain-English breakdown, for example: Ramp up to 100 users in 120s · Maintain steady state for 480s · Total duration 600s (10m 0s).

Step 4: Save and Run

  1. Click Save to create the load test
  2. Find your test in the Load Tests list - it shows Type, Users, Duration, and Recent Executions at a glance
  3. Click the Run (▶) button on any test to start an execution
  4. Monitor real-time results during execution

Next Steps

  • Analyze Results: Understand and interpret load test execution results
  • Key Concepts: Understand virtual users, ramp-up, assertions, and load profiles