Skip to main content

CLI Arguments

The list of available command line (CLI) arguments of NBomber:

CommandDescriptionExample
--configFile or URL path to configuration file--config=autocluster-config.json
--infraFile or URL path to infrastructure config--infra=infra-config.json
--licenseNBomber license key--license=YOUR_LICENSE_KEY
--session-idSets custom SessionId--session-id=my-session-123
--display-console-metricsEnables console metrics output--display-console-metrics=true
--targetSets target scenarios (in case of Cluster mode, it sets for both Coordinator and Agent)--target=my_test
--cluster-local-devEnables local dev cluster--cluster-local-dev=true
--cluster-agents-countSets the number of agents in the cluster--cluster-agents-count=2
--cluster-agent-groupSets AgentGroup
(should be used only for ManualCluster)
--cluster-agent-group=my_group
--cluster-idSets ClusterId--cluster-id=test_cluster
--cluster-node-typeSets NodeType
(should be used only for ManualCluster)
--cluster-node-type=coordinator
--cluster-node-type=agent
--cluster-nats-urlSets cluster NATSServerURL--cluster-nats-url=nats://localhost
--cluster-coordinator-targetSets target scenarios for Coordinator--cluster-coordinator-target=my_test
--cluster-agent-targetSets target scenarios for Agent--cluster-agent-target=my_test
info

It’s important to note that, if you want your application to handle CLI arguments, you should pass them into the NBomberRunner.Run(string[] args) method.

static void Main(string[] args)
{
var scenario = Scenario.Create("scenario", ...);

NBomberRunner
.RegisterScenario(scenario)
.Run(args);
}

Example of usage:

dotnet MyLoadTest.dll --license=YOUR_LICENSE_KEY --config=config.json