@loadstrike/loadstrike-sdk 1.0.20801 → 1.0.21301
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/dist/cjs/autopilot-contracts.js +11 -0
- package/dist/cjs/autopilot.js +717 -0
- package/dist/cjs/cluster.js +27 -2
- package/dist/cjs/correlation.js +132 -0
- package/dist/cjs/index.js +7 -2
- package/dist/cjs/local.js +116 -6
- package/dist/cjs/reporting.js +12 -0
- package/dist/cjs/runtime.js +966 -36
- package/dist/esm/autopilot-contracts.js +8 -0
- package/dist/esm/autopilot.js +709 -0
- package/dist/esm/cluster.js +27 -2
- package/dist/esm/correlation.js +132 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/local.js +116 -6
- package/dist/esm/reporting.js +12 -0
- package/dist/esm/runtime.js +966 -36
- package/dist/types/autopilot-contracts.d.ts +113 -0
- package/dist/types/autopilot.d.ts +43 -0
- package/dist/types/cluster.d.ts +21 -1
- package/dist/types/correlation.d.ts +132 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/local.d.ts +6 -0
- package/dist/types/reporting.d.ts +12 -0
- package/dist/types/runtime.d.ts +871 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,11 +5,12 @@ LoadStrike is a developer-first load testing SDK for Node.js applications, servi
|
|
|
5
5
|
## What This SDK Is For
|
|
6
6
|
|
|
7
7
|
- Author scenario-based load tests in TypeScript or JavaScript.
|
|
8
|
+
- Generate safe starter scenarios from captured HAR, OpenTelemetry trace JSON, browser recordings, or message pairs with Trace-to-test Autopilot.
|
|
8
9
|
- Exercise HTTP and event-driven workflows across multiple steps.
|
|
9
10
|
- Apply load simulations, thresholds, and custom metrics to real transactions.
|
|
10
|
-
- Generate local reports and, on
|
|
11
|
+
- Generate local reports and, on Business and Enterprise, publish observability data to supported sinks.
|
|
11
12
|
|
|
12
|
-
Built-in transport coverage includes HTTP, Kafka, RabbitMQ, NATS, Redis Streams, Azure Event Hubs, Push Diffusion, and delegate-based custom streams. Local report output supports HTML, Markdown, TXT, and CSV, and
|
|
13
|
+
Built-in transport coverage includes HTTP, Kafka, RabbitMQ, NATS, Redis Streams, Azure Event Hubs, Push Diffusion, and delegate-based custom streams. Local report output supports HTML, Markdown, TXT, and CSV, and Business and Enterprise can publish to InfluxDB, TimescaleDB, Grafana Loki, Datadog, Splunk HEC, and OpenTelemetry Collector.
|
|
13
14
|
|
|
14
15
|
## Requirements
|
|
15
16
|
|
|
@@ -52,6 +53,12 @@ const result = await LoadStrikeRunner
|
|
|
52
53
|
|
|
53
54
|
`run()` returns the detailed run result, including generated report files, scenario statistics, metrics, and sink status.
|
|
54
55
|
|
|
56
|
+
## Trace-To-Test Autopilot
|
|
57
|
+
|
|
58
|
+
Use `LoadStrikeAutopilot.generate(...)` to infer a starter plan from a captured artifact. Check `result.Readiness` and `result.ReadinessFailures` first; call `result.buildScenario()` only when it is `LoadStrikeAutopilotReadiness.Ready`, then execute the scenario through the normal runner with a valid `RunnerKey`.
|
|
59
|
+
|
|
60
|
+
Use `SecretBindings` to map redaction locations such as `header:Authorization` or `body:$.client_secret` to environment variables, `TrackingSelector` when the selector cannot be inferred, and `EndpointBindings`, `AllowedReplayHosts`, or `BaseUrlRewrite` when a replay target must be bound. Secret values are resolved when the generated scenario runs; they are not written into the generated plan. Any gate satisfied by user setup is omitted from `ReadinessFailures`.
|
|
61
|
+
|
|
55
62
|
## Runner Keys
|
|
56
63
|
|
|
57
64
|
Runnable workloads require a `RunnerKey`. Supply it with `.withRunnerKey(...)` or through your application configuration before calling `run()`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoadStrikeAutopilotReadiness = void 0;
|
|
4
|
+
exports.LoadStrikeAutopilotReadiness = {
|
|
5
|
+
Ready: "Ready",
|
|
6
|
+
RequiresSecrets: "RequiresSecrets",
|
|
7
|
+
RequiresEndpointBinding: "RequiresEndpointBinding",
|
|
8
|
+
RequiresTargetBinding: "RequiresTargetBinding",
|
|
9
|
+
RequiresTrackingSelector: "RequiresTrackingSelector",
|
|
10
|
+
RequiresReview: "RequiresReview"
|
|
11
|
+
};
|