Skip to content

Very simple load testing framework for Pull and Push scenarios.

License

Notifications You must be signed in to change notification settings

charleskorn-x/NBomber

 
 

Repository files navigation

NBomber logo

Build status NuGet Gitter

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)
  • Realtime Reporting: [Plain text; HTML; Csv; Md]
  • Statistics sinks: [InfluxDb]

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
MongoDb C# Test MongoDb with 2 READ queries
NUnit integration C# Simple NUnit test
WebSockets C# Test ping and pong on WebSockets
Realtime Statistics C# Realtime Statistics with InfluxDb sink
Data Feed C# Data Feed
Cluster C# Test HTTP with Cluster
HTTP F# Test HTTP
XUnit integration F# Simple XUnit test
Expecto integration F# Simple Expecto test
Custom Reporting Sink F# Custom Reporting Sink
Data Feed F# Data Feed

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 step = Step.Create("step", async context =>
{
    // you can do any logic here: go to http, websocket etc

    await Task.Delay(TimeSpan.FromSeconds(0.1));
    return Response.Ok();
});

var scenario = ScenarioBuilder.CreateScenario("Hello World!", new[] { step });

NBomberRunner.RegisterScenarios(scenario)
             .RunInConsole();

About

Very simple load testing framework for Pull and Push scenarios.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • F# 75.0%
  • JavaScript 13.4%
  • HTML 5.5%
  • PowerShell 2.4%
  • C# 2.2%
  • CSS 1.3%
  • Shell 0.2%