LoadStrike Overview
LoadStrike is a load-testing tool with native support for C#, Java, Python, TypeScript, and JavaScript. Use it to define scenarios, steps, simulations, thresholds, reports, clustering, and cross-platform correlation across HTTP, Kafka, NATS, Redis Streams, RabbitMQ, Azure Event Hubs, Push Diffusion, delegate-based custom transports, and Playwright-driven or Selenium-driven UI flows. Current runtime baselines are .NET 8, Java 17+, Node.js 20+, and Python 3.9+.
Coverage across getting started, configuration, reporting, cluster execution, endpoints, and protocols.
Structured so teams can jump directly to the part of the runtime they are implementing.
Examples stay aligned across C#, Java, Python, TypeScript, and JavaScript where the public SDK surface differs.
Getting Started
3 pagesLibrary Options
13 pagesConfiguration
7 pagesReports
11 pagesEndpoints
8 pagesCluster
6 pagesProtocols
4 pagesNo documentation groups matched that search. Try a transport, feature, or configuration term.
What LoadStrike Provides
- Scenario-based load testing with init, run, and clean lifecycle hooks.
- Step-level execution and custom success/failure responses with status code and latency metadata.
- Load models: Inject, InjectRandom, RampingInject, KeepConstant, RampingConstant, Pause, and iteration-based modes.
- Threshold checks for scenario, step, and metrics.
- Report generation in HTML, TXT, CSV, and Markdown formats.
- Built-in summary analytics charts for latency, failure rate, transferred bytes, and status-code-class distribution.
- Cluster execution modes (single node, coordinator, agent) with scenario targeting controls.
- Cross-platform tracking between source and destination endpoints with timeout, duplicate detection, and gather-by grouping.
- Native SDKs for C#, Java, Python, TypeScript, and JavaScript with consistent authoring, execution, and report output.
- First-party reporting sinks for InfluxDB, TimescaleDB, Grafana Loki, Datadog, Splunk HEC, and OTEL Collector on eligible plans, plus extension points for custom sinks and worker plugins.
- UI browser workflow execution by running Playwright or Selenium flows inside scenario and step delegates.
- Runner-key validation before run start, with available transports, clustering options, reporting sinks, and extensions determined by the active runtime access.
Core API Building Blocks
| Type | Purpose | Key API |
|---|---|---|
| LoadStrikeScenario | Defines scenario behavior and lifecycle. | Create, Empty, WithInit, WithClean, WithLoadSimulations, WithLicenseFeatures |
| LoadStrikeStep | Wraps step execution inside scenario run. | Run<T> |
| LoadStrikeResponse | Returns OK/FAIL outcomes with status, message, payload, and custom latency. | Ok, Fail |
| LoadStrikeSimulation | Composes load behavior. | Inject, KeepConstant, RampingInject, InjectRandom, Pause |
| LoadStrikeThreshold | Defines pass/fail quality gates. | CreateScenario, CreateStep, CreateMetric |
| LoadStrikeRunner / LoadStrikeContext | Registers scenarios, configures runtime, and runs tests. | RegisterScenarios, Run, WithReportFormats, WithWorkerPlugins |
Scenario and Load Model
Scenario is the main runtime unit. Each scenario can include one or more steps and one or more load simulations. The sample below reflects the LoadStrike runtime model, not an HTTP API contract.
Use the language tabs to view the same workflow in C#, Java, Python, TypeScript, or JavaScript.
Scenario Runtime Diagram
Scenario Sample
var scenario = LoadStrikeScenario.Create("orders", async context =>
{
var step = await LoadStrikeStep.Run<string>(
"publish-order",
context,
() => Task.FromResult(LoadStrikeResponse.Ok<string>(statusCode: "200")));
return step.AsReply();
})
.WithLoadSimulations(
LoadStrikeSimulation.Inject(10, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(20))
);
LoadStrikeRunner.RegisterScenarios(scenario)
.WithRunnerKey("rkl_your_local_runner_key")
.Run();
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeResponse;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeRunner;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeScenario;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeSimulation;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeStep;
var scenario = LoadStrikeScenario
.create("orders", context -> LoadStrikeStep.run(
"publish-order",
context,
() -> LoadStrikeResponse.ok("200")
).asReply())
.withLoadSimulations(LoadStrikeSimulation.inject(10, 1d, 20d));
LoadStrikeRunner
.registerScenarios(scenario)
.withRunnerKey("rkl_your_local_runner_key")
.run();
from loadstrike_sdk import (
LoadStrikeResponse,
LoadStrikeRunner,
LoadStrikeScenario,
LoadStrikeSimulation,
LoadStrikeStep,
)
scenario = (
LoadStrikeScenario.create(
"orders",
lambda context: LoadStrikeStep.run(
"publish-order",
context,
lambda: LoadStrikeResponse.ok("200"),
)["as_reply"](),
)
.with_load_simulations(LoadStrikeSimulation.inject(10, 1, 20))
)
result = (
LoadStrikeRunner.register_scenarios(scenario)
.with_runner_key("rkl_your_local_runner_key")
.run()
)
import {
LoadStrikeResponse,
LoadStrikeRunner,
LoadStrikeScenario,
LoadStrikeSimulation,
LoadStrikeStep
} from "@loadstrike/loadstrike-sdk";
const scenario = LoadStrikeScenario
.create("orders", async (context) => {
return LoadStrikeStep.run(
"publish-order",
context,
async () => LoadStrikeResponse.ok("200")
);
})
.withLoadSimulations(LoadStrikeSimulation.inject(10, 1, 20));
const result = await LoadStrikeRunner
.registerScenarios(scenario)
.withRunnerKey("rkl_your_local_runner_key")
.run();
const {
LoadStrikeResponse,
LoadStrikeRunner,
LoadStrikeScenario,
LoadStrikeSimulation,
LoadStrikeStep
} = require("@loadstrike/loadstrike-sdk");
(async () => {
const scenario = LoadStrikeScenario
.create("orders", async (context) => {
return LoadStrikeStep.run(
"publish-order",
context,
async () => LoadStrikeResponse.ok("200")
);
})
.withLoadSimulations(LoadStrikeSimulation.inject(10, 1, 20));
const result = await LoadStrikeRunner
.registerScenarios(scenario)
.withRunnerKey("rkl_your_local_runner_key")
.run();
})();
Runner Configuration Surface
| Category | Supported Configuration |
|---|---|
| Identity | WithTestSuite, WithTestName, WithSessionId |
| Reports | WithReportFolder, WithReportFileName, WithReportFormats, WithReportFinalizer, WithDetailedReportFinalizer, WithoutReports |
| Metrics and Console | DisplayConsoleMetrics, WithReportingInterval |
| Cluster | WithNodeType, WithClusterId, WithAgentGroup, WithAgentsCount, EnableLocalDevCluster |
| Scenario Targeting | WithTargetScenarios, WithAgentTargetScenarios, WithCoordinatorTargetScenarios |
| Extensibility | WithWorkerPlugins, WithReportingSinks |
| Config and Infra | LoadConfig, LoadInfraConfig, WithLoggerConfig, WithNatsServerUrl, WithRunnerKey |
Licensing Runtime
- Runner key is mandatory at run start. Missing runner key blocks execution.
- Validation happens online before a run begins.
- Available runtime features can affect transports, sinks, plugins, CI or distributed execution, device allowances, and runtime limits.
- If validation fails or the runner key is no longer active, new runs do not start.
- If a license expires during an active run, the current run completes and subsequent runs are blocked until validation succeeds again.
Cross-Platform Correlation
LoadStrike supports source-destination correlation at scenario level via CrossPlatformTrackingConfiguration.
The examples below stay on the real public SDK surfaces for each language, including builder and tracking-config differences.
- Run modes: GenerateAndCorrelate and CorrelateExistingTraffic.
- Default timeout: 30s (CorrelationTimeout), timeout counts as failure by default.
- Selectors: TrackingFieldSelector.Parse("header:..."), TrackingFieldSelector.Parse("json:..."), or direct new TrackingFieldSelector(TrackingFieldLocation.Header, "X-Correlation-Id"); TS endpoint definitions also accept selector instances for TrackingField and GatherByField.
- Optional destination grouping: GatherByField (destination only).
- Object-first payload model: MessagePayload, optional MessagePayloadType, JsonSettings, and JsonConvertSettings.
- Correlation stores: In-memory or Redis (CorrelationStoreConfiguration.RedisStore).
- Built-in tracking metrics include source, destination, matched, timeout, duplicates, and latency gauges.
Cross-Platform Setup
var source = new HttpEndpointDefinition
{
Name = "http-source",
Mode = TrafficEndpointMode.Produce,
TrackingField = TrackingFieldSelector.Parse("header:X-Correlation-Id"),
Url = "https://orders.example.com/api/orders",
Method = "POST",
MessagePayload = new { orderId = 1001 }
};
var destination = new KafkaEndpointDefinition
{
Name = "kafka-destination",
Mode = TrafficEndpointMode.Consume,
TrackingField = TrackingFieldSelector.Parse("header:X-Correlation-Id"),
BootstrapServers = "localhost:9092",
Topic = "orders.completed",
ConsumerGroupId = "orders-tests"
};
var tracking = new CrossPlatformTrackingConfiguration
{
Source = source,
Destination = destination,
RunMode = TrackingRunMode.GenerateAndCorrelate,
CorrelationTimeout = TimeSpan.FromSeconds(30)
};
import com.loadstrike.runtime.CrossPlatformTrackingConfiguration;
import com.loadstrike.runtime.HttpEndpointDefinition;
import com.loadstrike.runtime.KafkaEndpointDefinition;
import com.loadstrike.runtime.LoadStrikeCorrelation.TrackingFieldSelector;
import com.loadstrike.runtime.LoadStrikeTransports;
var source = new HttpEndpointDefinition();
source.name = "http-source";
source.mode = LoadStrikeTransports.TrafficEndpointMode.Produce;
source.trackingField = TrackingFieldSelector.parse("header:X-Correlation-Id");
source.url = "https://orders.example.com/api/orders";
source.method = "POST";
source.messagePayload = java.util.Map.of("orderId", 1001);
var destination = new KafkaEndpointDefinition();
destination.name = "kafka-destination";
destination.mode = LoadStrikeTransports.TrafficEndpointMode.Consume;
destination.trackingField = TrackingFieldSelector.parse("header:X-Correlation-Id");
destination.bootstrapServers = "localhost:9092";
destination.topic = "orders.completed";
destination.consumerGroupId = "orders-tests";
var tracking = new CrossPlatformTrackingConfiguration();
tracking.source = source;
tracking.destination = destination;
tracking.runMode = LoadStrikeTransports.TrackingRunMode.GenerateAndCorrelate;
tracking.correlationTimeoutSeconds = 30d;
from loadstrike_sdk import (
CrossPlatformScenarioConfigurator,
LoadStrikeScenario,
LoadStrikeSimulation,
)
tracking = {
"RunMode": "GenerateAndCorrelate",
"CorrelationTimeoutSeconds": 30,
"Source": {
"Kind": "Http",
"Name": "http-source",
"Mode": "Produce",
"TrackingField": "header:X-Correlation-Id",
"Url": "https://orders.example.com/api/orders",
"Method": "POST",
"MessagePayload": {"orderId": 1001},
},
"Destination": {
"Kind": "Kafka",
"Name": "kafka-destination",
"Mode": "Consume",
"TrackingField": "header:X-Correlation-Id",
"BootstrapServers": "localhost:9092",
"Topic": "orders.completed",
"ConsumerGroupId": "orders-tests",
},
}
scenario = (
CrossPlatformScenarioConfigurator.Configure(
LoadStrikeScenario.empty("orders-http-to-kafka"),
tracking,
)
.with_load_simulations(LoadStrikeSimulation.iterations_for_constant(1, 1))
)
import {
CrossPlatformScenarioConfigurator,
LoadStrikeScenario,
LoadStrikeSimulation,
TrackingFieldSelector
} from "@loadstrike/loadstrike-sdk";
const tracking = {
RunMode: "GenerateAndCorrelate",
CorrelationTimeoutSeconds: 30,
Source: {
Kind: "Http",
Name: "http-source",
Mode: "Produce",
TrackingField: new TrackingFieldSelector("Header", "X-Correlation-Id"),
Url: "https://orders.example.com/api/orders",
Method: "POST",
MessagePayload: { orderId: 1001 }
},
Destination: {
Kind: "Kafka",
Name: "kafka-destination",
Mode: "Consume",
TrackingField: new TrackingFieldSelector("Header", "X-Correlation-Id"),
BootstrapServers: "localhost:9092",
Topic: "orders.completed",
ConsumerGroupId: "orders-tests"
}
};
const scenario = CrossPlatformScenarioConfigurator
.Configure(LoadStrikeScenario.empty("orders-http-to-kafka"), tracking)
.withLoadSimulations(LoadStrikeSimulation.iterationsForConstant(1, 1));
const {
CrossPlatformScenarioConfigurator,
LoadStrikeScenario,
LoadStrikeSimulation,
TrackingFieldSelector
} = require("@loadstrike/loadstrike-sdk");
const tracking = {
RunMode: "GenerateAndCorrelate",
CorrelationTimeoutSeconds: 30,
Source: {
Kind: "Http",
Name: "http-source",
Mode: "Produce",
TrackingField: new TrackingFieldSelector("Header", "X-Correlation-Id"),
Url: "https://orders.example.com/api/orders",
Method: "POST",
MessagePayload: { orderId: 1001 }
},
Destination: {
Kind: "Kafka",
Name: "kafka-destination",
Mode: "Consume",
TrackingField: new TrackingFieldSelector("Header", "X-Correlation-Id"),
BootstrapServers: "localhost:9092",
Topic: "orders.completed",
ConsumerGroupId: "orders-tests"
}
};
const scenario = CrossPlatformScenarioConfigurator
.Configure(LoadStrikeScenario.empty("orders-http-to-kafka"), tracking)
.withLoadSimulations(LoadStrikeSimulation.iterationsForConstant(1, 1));
Endpoint Support Matrix
| Endpoint | Modes | Notable Support |
|---|---|---|
| HTTP | Produce / Consume | GET/POST/etc, body types (JSON/Text/XML/Form/Binary), auth types (None/Basic/Bearer/OAuth2 Client Credentials), request/response tracking source selection. |
| Kafka | Produce / Consume | SASL mechanisms (Plain/ScramSha256/ScramSha512/Gssapi/OAuthBearer), protocol options (Plaintext/Ssl/SaslPlaintext/SaslSsl), Confluent settings dictionary. |
| NATS | Produce / Consume | Subject-based publish/consume, optional queue groups, username/password or token auth, connection name, reconnect-attempt controls, header/body tracking extraction. |
| Redis Streams | Produce / Consume | Stream produce/consume, consumer groups, consumer names, batch size controls, optional max-length trimming, start-from-earliest controls, header/body tracking extraction. |
| RabbitMQ | Produce / Consume | Exchange/routing or queue publish, queue consume, SSL toggle, durable/auto-ack controls. |
| Azure Event Hubs | Produce / Consume | Connection string + hub, consumer group, optional partition and start-from-earliest controls. |
| Push Diffusion | Produce / Consume | Delegate-driven publish and subscribe integration with connection metadata. |
| Delegate Stream | Produce / Consume | Custom transport integration using produce/consume delegates. |
| Playwright UI | Scenario / Step | Run browser-based user journeys directly inside LoadStrikeScenario delegates with standard LoadStrike reporting and thresholds. |
| Selenium UI | Scenario / Step | Run browser-based user journeys through Selenium WebDriver inside LoadStrikeScenario delegates with the same LoadStrike reporting and threshold model. |
Reporting and Metrics
- Report formats: Html, Txt, Csv, Md.
- C#, Java, Python, TypeScript, and JavaScript share the same LoadStrike report surface across those formats: matching layout, section order, field names, timestamps, metrics, plugin tabs, and formatting conventions.
- Default HTML tabs include Summary, Scenarios, Scenario Measurements, Steps, Step Measurements, Status Codes, Failed Responses, Thresholds, and Metrics.
- Website and HTML reports include icon-only Light/Dark toggles fixed to the top-right corner; default theme is Light and preference is saved in browser local storage.
- Summary always includes latency as both a table and a line graph.
- Summary also includes Failure Rate by Scenario, Bytes by Scenario, and Status Code Class Mix charts for quick reliability and payload diagnostics.
- Summary latency trend uses overlap-safe rendering (dash patterns + point markers) so P50, P75, P95, and P99 remain visible when percentile values overlap.
- Correlation plugin tabs include: Ungrouped Corelation Summary and Grouped Correlation Summary.
- TXT keeps plugin-table summaries, CSV and Markdown remain scenario-focused, and plugin hints stay in JSON plus HTML plugin tabs.
- Failed Responses is a single merged tab that includes both Failed Status Codes and Failed and Timed Out Rows tables.
- Grouped correlation summary includes LatencyP50Ms, LatencyP80Ms, LatencyP85Ms, LatencyP90Ms, LatencyP95Ms, LatencyP99Ms.
- Both correlation summary tabs render table-first and charts below; ungrouped uses one combined percentile graph with P50..P99 on the X-axis while grouped renders one chart per GatherBy value with a single percentile line.
- Correlation line charts are rendered in bounded cards (non-stretched) and use extra top padding so legend labels stay clear from top y-axis values.
- Tracking metrics include counters and gauges such as source/destination totals, matched, timeout, failure, duplicates, inflight count, and latency gauges.
Report Preview (Actual Representation)
The preview below reflects the LoadStrike HTML report layout used across supported languages: fixed left tabs, tab content cards, and plugin summary tables.
| Scope | Scenario | Result | Count | RPS | LatencyP50Ms | LatencyP75Ms | LatencyP95Ms | LatencyP99Ms |
|---|---|---|---|---|---|---|---|---|
| Scenario | orders-http-to-kafka | OK | 120 | 20.0 | 18.4 | 24.8 | 44.8 | 63.4 |
| Scenario | Destination | GatherByField | GatherByValue | Total | Success | Failure | LatencyP50Ms | LatencyP80Ms | LatencyP90Ms | LatencyP95Ms |
|---|---|---|---|---|---|---|---|---|---|---|
| orders-http-to-kafka | orders-kafka-destination | header:X-Tenant-Id | tenant-a | 120 | 118 | 2 | 19.1 | 28.5 | 34.9 | 45.1 |