Giter VIP home page Giter VIP logo

pragmaticflow / nbomber Goto Github PK

View Code? Open in Web Editor NEW
2.0K 2.0K 127.0 12.09 MB

Modern and flexible load testing framework for Pull and Push scenarios, designed to test any system regardless a protocol (HTTP/WebSockets/AMQP etc) or a semantic model (Pull/Push).

Home Page: https://nbomber.com

License: Other

C# 0.79% PowerShell 0.75% F# 41.92% CSS 49.76% JavaScript 2.03% HTML 4.71% Shell 0.05%
csharp dotnet fsharp integration-testing load-testing performance-testing

nbomber's Introduction

NBomber logo

NuGet Nuget

NBomber is a modern and flexible load-testing framework for Pull and Push scenarios, designed to test any system regardless of a protocol (HTTP/WebSockets/AMQP, etc) or a semantic model (Pull/Push).

NBomber is free for personal use, developer-centric, and extensible. Using NBomber, you can test the reliability and performance of your systems and catch performance regressions and problems earlier. NBomber will help you to build resilient and performant applications that scale.

NBomber 5

Links

Why we build NBomber and what you can do with it?

The main reason behind NBomber is to provide a lightweight framework for writing load tests which you can use to test literally any system and simulate any production workload. We wanted to provide only a few abstractions so that we could describe any type of load and still have a simple, intuitive API. Another goal is to provide building blocks to validate your POC (proof of concept) projects by applying any complex load distribution. With NBomber you can test any PULL or PUSH system (HTTP, WebSockets, GraphQl, gRPC, SQL Databse, MongoDb, Redis etc). With NBomber you can convert some of your integration tests to load tests easily.

NBomber as a modern framework provides:

  • Zero dependencies on protocol (HTTP/WebSockets/AMQP/SQL)
  • Zero dependencies on semantic model (Pull/Push)
  • Very flexible configuration and dead simple API
  • Distributed cluster support
  • Real-time reporting
  • CI/CD integration (xUnit and NUnit runners are supported)
  • Plugins/extensions support - add your own plugins or data sinks
  • Data feed support - inject real or fake data into your tests
  • Debuggability of your load test - debug your tests using your favorite IDE

What makes it very simple?

One of the design goals of NBomber is to keep API as minimal as possible. Because of this, NBomber focuses on fully utilizing programming language(C#/F#) constructs instead of reinventing a new DSL that should be learned. In other words, if you want to write a for loop, you don't need to learn a DSL for this.

var scenario = Scenario.Create("hello_world_scenario", async context =>
{
    // you can define and execute any logic here,
    // for example: send http request, SQL query etc
    // NBomber will measure how much time it takes to execute your logic
    await Task.Delay(1_000);

    return Response.Ok();
})
.WithLoadSimulations(
    Simulation.Inject(rate: 10,
                      interval: TimeSpan.FromSeconds(1),
                      during: TimeSpan.FromSeconds(30))
);

NBomberRunner
    .RegisterScenarios(scenario)
    .Run();

Examples

Type Language
NBomber Demo C#

nbomber's People

Contributors

abenedykt avatar antyadev avatar arthnrick avatar candritzky avatar deyanp avatar dominiqueplante avatar isaacabraham avatar michielvt-slc avatar mrboie avatar olenakostash avatar richard-bm avatar vilinski avatar yaroshvitaliy avatar yurii-hunter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nbomber's Issues

exception when trying to repeat a scenario that includes a listen step one more time

Steps to reproduce

  • run the simple push scenario (c#)
  • when run finishes and and you are asked to repeat the same scenario one more time - type 'y'
  • observe exception
System.ArgumentException
  HResult=0x80070057
  Message=An item with the same key has already been added. Key: warm_up_flow
  Source=System.Private.CoreLib
  StackTrace:
   at System.ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException(Object key)
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at <StartupCode$NBomber>[email protected](StepListener x) in F:\code\NBomber\src\NBomber\Domain\Scenario.fs:line 57
   at NBomber.StepListeners.Init(StepListener[] items) in F:\code\NBomber\src\NBomber\Domain\Scenario.fs:line 57
   at [email protected](ListenerStep listStep) in F:\code\NBomber\src\NBomber\Domain\Scenario.fs:line 112
   at NBomber.TestFlowModule.initFlow(TestFlow flow) in F:\code\NBomber\src\NBomber\Domain\Scenario.fs:line 112
   at [email protected](TestFlow flow) in F:\code\NBomber\src\NBomber\ScenarioRunner.fs:line 27
   at NBomber.ScenarioRunner.runScenario(Scenario scenario) in F:\code\NBomber\src\NBomber\ScenarioRunner.fs:line 27
   at NBomber.ScenarioRunner.Run(Scenario scenario) in F:\code\NBomber\src\NBomber\ScenarioRunner.fs:line 18
   at NBomber.Examples.CSharp.Program.Main(String[] args) in F:\code\NBomber\examples\NBomber.Examples.CSharp\Program.cs:line 18

Possible fix

I think that when initing the listeners, the listeners dictionary should be cleaned first.

print basic HTML report

  1. display common table of all results
  2. display the graphs like latence < 800ms and latency > 1.2 sec

XUnit / NUnit Integration

Example of proposed output message [XUnit]

[xUnit.net 00:00:16.5057600] Tests.My test [FAIL]
Failed Tests.My test
Error Message:

Assertion #1 FAILED for Scenario Test HTTP (https://github.com) with 100 concurrent users
Assertion #2 FAILED for Scenario Test HTTP (https://github.com) with 100 concurrent users
Assertion #6 FAILED for Scenario Test HTTP (https://github.com) with 100 concurrent users
Assertion #7 NOT FOUND for Test flow GET flow1
Assertion #8 FAILED for Test Flow Test HTTP (https://github.com) with 100 concurrent users
Assertion #9 FAILED for Step Test HTTP (https://github.com) with 100 concurrent users
Assertion #10 FAILED for Step Test HTTP (https://github.com) with 100 concurrent users
Assertion #11 FAILED for Step Test HTTP (https://github.com) with 100 concurrent users

Expected: True
Actual: False
Stack Trace:
at Tests.My test() in /Users/alexkondrashov/Projects/NBomber/examples/NBomber.Examples.FSharp.Assertions/Tests.fs:line 93

Total tests: 1. Passed: 0. Failed: 1. Skipped: 0.
Test Run Failed.
Test execution time: 17.4991 Seconds

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.