JSON Config

Use JSON config when you want runtime settings outside the source code. This is useful for shared environments, CI, and repeatable test hosts.

What this page helps you do

What this page helps you do

Use JSON config when you want runtime settings outside the source code. This is useful for shared environments, CI, and repeatable test hosts.

Who this is for

Engineers writing or reviewing scenario code in one of the supported SDKs.

Prerequisites

  • A scenario or runtime surface you want to wire correctly in code

By the end

The exact SDK surface you need for this part of the runtime.

Use this page when

Use this reference when you already know the workflow and need the exact JSON Config API surface in code.

Visual guide

Sequence diagram showing how a LoadStrike workflow moves from setup to report output.
This page fits into the same setup, run, correlate, and report flow as the rest of the public LoadStrike runtime.

Guide

LoadConfig

Use LoadConfig(path) for normal runtime settings and LoadInfraConfig(path) for sink or plugin infrastructure settings. TypeScript and JavaScript BuildContext run flows also honor `--config=<path>` and `--infraconfig=<path>` at execution time.

Supported Keys

JSON config can hold test identity, report settings, node and cluster settings, runner key settings, and timeout values. Common examples are TestSuite, TestName, SessionId, ReportFolder, ReportFileName, ReportFormats, and ReportingIntervalMs.

Parsing Rules

Boolean keys use strict true or false parsing only. Config and CLI key lookup is case-insensitive. List-like keys such as ReportFormats, TargetScenarios, AgentTargetScenarios, and CoordinatorTargetScenarios are comma-delimited and de-duplicated using case-sensitive ordinal matching. ReportFormats accepts only txt, html, csv, md, or the markdown alias. NodeType numeric tokens map to 0=SingleNode, 1=Coordinator, 2=Agent.

Override Order

LoadStrike starts with the base context values, merges JSON settings into that context, and then lets CLI arguments override both for one-off execution changes.

SDK reference samples

Use these SDK samples to compare how JSON Config is exposed across the supported languages before you wire it into a full scenario.

If you run these examples locally, add a valid runner key before execution starts. Set it with WithRunnerKey("...") or the config key LoadStrike:RunnerKey.

JSON Config

using LoadStrike;

LoadStrikeRunner.RegisterScenarios(scenario).LoadConfig("./appsettings.loadstrike.json").Run();

Supported config keys and how they behave

A typical runtime config file keeps the main run settings under the LoadStrike section and uses the nested LicenseValidation object for licensing timeout settings.

LoadConfig(path)

Loads normal runtime configuration such as report output and run identity settings.

LoadInfraConfig(path)

Loads sink and plugin infrastructure settings, usually from a different file than the main runtime config.

LoadStrike:TestSuite / TestName / SessionId

Optional run identity fields used in reports, sink exports, and final artifact names.

LoadStrike:ReportFolder / ReportFileName / WithoutReports

Report output controls. WithoutReports disables local report file generation.

LoadStrike:ReportFormats

Comma-delimited report format list. Accepted tokens are txt, html, csv, md, and markdown. Generated local report files use LF line endings across SDKs.

LoadStrike:ReportingIntervalMs

Realtime reporting cadence in milliseconds. The value must be positive.

LoadStrike:ScenarioCompletionTimeoutMs / ClusterCommandTimeoutMs

Positive timeout controls for scenario shutdown and coordinator-agent coordination.

LoadStrike:NodeType / ClusterId / AgentGroup / AgentsCount / NatsServerUrl

Cluster-role settings for local or distributed execution. NodeType accepts SingleNode, Coordinator, Agent, or numeric 0, 1, 2.

LoadStrike:TargetScenarios / AgentTargetScenarios / CoordinatorTargetScenarios

Comma-delimited scenario filters used to target work to the right runtime role.

LoadStrike:MinimumLogLevel / DisplayConsoleMetrics / EnableLocalDevCluster / RestartIterationMaxAttempts

Logging and runtime behavior controls. DisplayConsoleMetrics and EnableLocalDevCluster are strict booleans.

LoadStrike:RunnerKey / LicenseValidation:TimeoutMs

Licensing settings. RunnerKey is required for runnable workloads, and the license validation timeout must be positive when configured.

{
  "LoadStrike": {
    "TestSuite": "orders-suite",
    "TestName": "submit-orders",
    "SessionId": "orders-local-smoke",
    "ReportFolder": "./reports",
    "ReportFileName": "orders-local-smoke",
    "ReportFormats": "html,csv,md",
    "ReportingIntervalMs": 5000,
    "ScenarioCompletionTimeoutMs": 30000,
    "ClusterCommandTimeoutMs": 30000,
    "TargetScenarios": "submit-orders",
    "MinimumLogLevel": "Information",
    "DisplayConsoleMetrics": true,
    "EnableLocalDevCluster": false,
    "RestartIterationMaxAttempts": 1,
    "RunnerKey": "rkl_your_local_runner_key",
    "LicenseValidation": {
      "TimeoutMs": 10000
    }
  }
}

Configuration key lookup is case-insensitive, boolean parsing is strict, and list values are split on commas with case-sensitive de-duplication.