Modern and flexible load testing framework for Pull and Push scenarios, designed to test any system regardless a protocol (HTTP/WebSockets/AMQP etc) or a semantic model (Pull/Push).
https://github.com/PragmaticFlow/NBomber/issues/499 Added support for ScenarioPartition https://github.com/PragmaticFlow/NBomber/issues/534 Added ScenarioInfo for ScenarioInitContext Improved performance of ScenarioStatsActor on 30% Added ScenarioInfo for ScenarioInitContext to be able to get it in the Scenario init phase Added NBomberRunner.WithMinimumLogLevel Added "LiteDBExample" by @OlenaKostash
Extended Http.Send() with HttpCompletionOption and CancellationToken
Added Logger documentation page Added initial Cluster overview page
Added support for ScenarioPartition Fixed bug with handling AgentInitFailed status Added NBomberClusterRunner.WithMinimumLogLevel
Full Changelog: https://github.com/PragmaticFlow/NBomber/compare/v4.0.0...v4.1.0
A new LoadSimulation definition:
type LoadSimulation =
| RampingConstant of copies:int * during:TimeSpan
| KeepConstant of copies:int * during:TimeSpan
| RampingInject of rate:int * interval:TimeSpan * during:TimeSpan
| Inject of rate:int * interval:TimeSpan * during:TimeSpan
| InjectRandom of minRate:int * maxRate:int * interval:TimeSpan * during:TimeSpan
| Pause of during:TimeSpan
Type inference improvement for C# Response Api Improved data transfer tracking for scenario Global Info
Fixed issue with concurrent NATS message handling Added support to set cluster-id via CLI
Now you can use --cluster-id=mycluster
Also, the API method was added:
NBomberClusterRunner.withClusterId "mycluster"
let run () =
use httpClient = new HttpClient()
Scenario.create("http_scenario", fun context -> task {
let! response =
Http.createRequest "GET" "https://nbomber.com"
|> Http.withHeader "Accept" "text/html"
|> Http.withBody (new StringContent("{ some JSON }"))
|> Http.send httpClient
return response
})
|> Scenario.withoutWarmUp
|> Scenario.withLoadSimulations [InjectPerSec(rate = 100, during = seconds 30)]
|> NBomberRunner.registerScenario
|> NBomberRunner.run
public void Run()
{
using var httpClient = new HttpClient();
var scenario = Scenario.Create("http_scenario", async context =>
{
var request =
Http.CreateRequest("GET", "https://nbomber.com")
.WithHeader("Accept", "text/html")
.WithBody(new StringContent("{ some JSON }"));
var response = await Http.Send(httpClient, request);
return response;
})
.WithoutWarmUp()
.WithLoadSimulations(Simulation.InjectPerSec(100, TimeSpan.FromSeconds(30)));
NBomberRunner
.RegisterScenarios(scenario)
.Run();
}