EndureNet.Lib 1.0.1

dotnet add package EndureNet.Lib --version 1.0.1                
NuGet\Install-Package EndureNet.Lib -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EndureNet.Lib" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EndureNet.Lib --version 1.0.1                
#r "nuget: EndureNet.Lib, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 154 2/7/2024
1.0.0 107 2/7/2024