Skip to content

Latest commit

History

257 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

NLoad

NuGetBuild status

NLoad is a simple and easy to use load testing framework for .NET that helps testing Websites, WCF Services and small bits of code to identify and eliminate bottlenecks and concurrency issues.

Installation

To install NLoad via NuGet, run the following command in the Package Manager Console

Install-Package NLoad

Getting Started

Implement a class that inherits the ITest interface.

For example:

publicclassMyTest:ITest{publicvoidInitialize(){// Initialize the test, e.g., create a WCF client, load files into memory, etc.}publicTestResultExecute(){// Send an http request, invoke a WCF service or whatever you want to load test.returnTestResult.Success;// or TestResult.Failure}}

This class will be created and initialized multiple times during the load test.

Create and configure a load test:

varloadTest=NLoad.Test<MyTest>().WithNumberOfThreads(5).WithDurationOf(TimeSpan.FromMinutes(5)).OnHeartbeat((s,e)=>Console.WriteLine(e.Throughput)).Build();

Run it

varresult=loadTest.Run();

Load Test Result

  • Total Errors
  • Total Runtime
  • Total Iterations
  • Min/Max/Average Throughput
  • Min/Max/Average Response Time

Events

EventDescription
HeartbeatFired every one second
StartingFired when the load test is starting
FinishedFired when the load test completes
AbortedFired when the load test is aborted

License

Apache 2.0

About

A simple and easy to use load testing framework for .NET

Topics

Resources

Stars

16 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages