Skip to content

Very simple load testing framework for Pull and Push scenarios.

License

Notifications You must be signed in to change notification settings

rogerhmar/NBomber

 
 

Repository files navigation

NBomber logo

Build status NuGet

Very simple load testing framework for Pull and Push scenarios. It's 100% written in F# and targeting .NET Core and full .NET Framework.

How to install

To install NBomber via NuGet, run this command in NuGet package manager console:

PM> Install-Package NBomber

Documentation

Documentation is located here.

Run test scenario

how to run a scenario gif

View report

view report

Analyze trends

analyze trends

Features

  • 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 technologies

  • Supported runtimes: .NET Framework (4.6+), .NET Core (2.0+), Mono, CoreRT
  • Supported languages: C#, F#, Visual Basic
  • Supported OS: Windows, Linux, macOS

Examples

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

Contributing

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.

Why another {x} framework for load testing?

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.

What makes it very simple?

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

About

Very simple load testing framework for Pull and Push scenarios.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • F# 85.9%
  • PowerShell 5.4%
  • HTML 3.9%
  • Shell 2.1%
  • C# 1.5%
  • JavaScript 1.2%