Very simple load testing framework for Pull and Push scenarios. It's 100% written in F# and targeting .NET Core and full .NET Framework.
To install NBomber via NuGet, run this command in NuGet package manager console:
PM> Install-Package NBomber
Documentation is located here.
- Pull scenario (Request-response)
- Push scenario (Pub/Sub)
- Sequential flow
- Test runner support: [XUnit; NUnit]
- Cluster support (run scenario from several nodes in parallel)
- Reporting: [Plain text; HTML; Csv; Md]
- Statistics sinks: (analyze and monitor performance trends via sinking statistics to any data storage)
- Supported runtimes: .NET Framework (4.6+), .NET Core (2.0+), Mono, CoreRT
- Supported languages: C#, F#, Visual Basic
- Supported OS: Windows, Linux, macOS
Scenario | Language | Example |
---|---|---|
HTTP | C# | Test HTTP (https://github.com) |
MongoDb | C# | Test MongoDb with 2 READ queries |
NUnit integration | C# | Simple NUnit test |
WebSockets | C# | Test ping and pong on WebSockets |
HTTP | F# | Test HTTP (https://github.com) |
XUnit integration | F# | Simple XUnit test |
Would you like to help make NBomber even better? We keep a list of issues that are approachable for newcomers under the good-first-issue label.
The main reasons are:
- To be technology agnostic as much as possible (no dependency on any protocol: HTTP, WebSockets, SSE etc).
- To be able to test .NET implementation of specific driver. During testing, it was identified many times that the performance could be slightly different because of the virtual machine(.NET, Java, PHP, Js, Erlang, different settings for GC) or just quality of drivers. For example there were cases that drivers written in C++ and invoked from NodeJs app worked faster than drivers written in C#/.NET. Therefore, it does make sense to load test your app using your concrete driver and runtime.
NBomber is not really a framework but rather a foundation of building blocks which you can use to describe your test scenario, run it and get reports.
var step1 = Step.CreateAction("simple step", ConnectionPool.None, async context =>
{
// you can do any logic here: go to http, websocket etc
// NBomber will measure execution of this lambda function
await Task.Delay(TimeSpan.FromSeconds(0.1));
return Response.Ok();
});
var scenario = ScenarioBuilder.CreateScenario("Hello World from NBomber!", step1);
NBomberRunner.RegisterScenarios(scenario)
.RunInConsole();