github PragmaticFlow/NBomber v4.0.0.0-beta6
NBomber v4.0.0-beta6

latest releases: v5.8.1, v5.8.0, v5.7.0...
2 years ago

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

Added Http Builder API

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();
}

Don't miss a new NBomber release

NewReleases is sending notifications on new releases.