EndureNet.Lib
1.0.1
dotnet add package EndureNet.Lib --version 1.0.1
NuGet\Install-Package EndureNet.Lib -Version 1.0.1
<PackageReference Include="EndureNet.Lib" Version="1.0.1" />
paket add EndureNet.Lib --version 1.0.1
#r "nuget: EndureNet.Lib, 1.0.1"
// Install EndureNet.Lib as a Cake Addin #addin nuget:?package=EndureNet.Lib&version=1.0.1 // Install EndureNet.Lib as a Cake Tool #tool nuget:?package=EndureNet.Lib&version=1.0.1
endure-net - simple library for quick load tests
EndureNet is a lightweight, user-friendly library to assist developers in configuring and executing load tests on their web applications and APIs. It enables creation of scenarios, each comprising at least one HTTP request. Users can incorporate multiple requests that occur in sequence, allowing a request to utilize the response from the previous request. We refer to such sequence as "scenario" representing a single user performing a sequence of requests. The example below demonstrates the library's usage.
Installation
To get started with endure-net, install the NuGet package using the following command:
dotnet add package EndureNet.Lib
Example usage
using EndureNet.Lib;
var scenario = ScenarioBuilder.Create()
.WithNumberOfUsers(30)
.WithDuration(TimeSpan.FromSeconds(60))
.WithThinkTime(TimeSpan.FromSeconds(1))
.WithRandomThinkTime(TimeSpan.FromSeconds(1))
.Then(_ => new HttpRequestMessage(HttpMethod.Get, "http://localhost:5036/WeatherForecast"))
.Then(response => new HttpRequestMessage(HttpMethod.Post, "http://localhost:5036/WeatherForecast")
.WithJsonContentFromPreviousMessage(response))
.Build();
await scenario.Run();
var statistics = scenario.GenerateSummary();
Console.WriteLine("Load test summary:");
Console.WriteLine($"Average response time: {statistics.AverageResponseTime}ms");
Console.WriteLine($"Total number of requests: {statistics.TotalRequests}");
Console.WriteLine("Number of responses with specific HTTP status codes:");
foreach (var kvp in statistics.HttpStatusCodeCounts)
{
Console.WriteLine($"{kvp.Key}: {kvp.Value}");
}
Console.WriteLine($"Number of errors: {statistics.TotalErrors}");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- Microsoft.Extensions.Http (>= 8.0.0)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 8.0.0)
-
net8.0
- Microsoft.Extensions.Http (>= 8.0.0)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.