NBomber
Type inference improvement for C# Response Api
Improved data transfer tracking for scenario Global Info
NBomber.Cluster
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"
NBomber.HTTP
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();
}