xUnitV3LoadFramework is a robust and user-friendly load testing framework built to seamlessly integrate with xUnit and powered by Akka.NET actors. It allows developers to efficiently define, execute, and analyze parallel load test scenarios, making load testing a natural part of your automated testing workflow.
- ✅ Easily define load test scenarios with intuitive attributes.
- ✅ Parallel load test execution using Akka.NET actors.
- ✅ Detailed aggregation and analysis of test results.
- ✅ Fully integrated with xUnit testing framework.
Install via NuGet package manager:
dotnet add package xUnitV3LoadFrameworkUse the Load attribute (inheriting from FactAttribute) to configure concurrency level, duration, interval, and execution order.
Execute your tests using the standard xUnit command:
dotnet testHere's a clear example demonstrating how to define and execute load tests using the Specification base class and the [Load] attribute:
using xUnitV3LoadFramework.Attributes;
using xUnitV3LoadFramework.Extensions;
using xUnitV3LoadFramework.Extensions.Framework;
using System;
[assembly: TestFramework(typeof(LoadTestFramework))]
namespace xUnitLoadDemo;
public class ExampleLoadSpecification : Specification
{
protected override void EstablishContext()
{
Console.WriteLine(">> Setup phase");
}
protected override void Because()
{
Console.WriteLine(">> Action phase");
}
[Load(order: 1, concurrency: 2, duration: 5000, interval: 500)]
public void should_run_load_scenario_1()
{
Console.WriteLine(">> Running Load 1");
}
[Load(order: 2, concurrency: 3, duration: 7000, interval: 300)]
public void should_run_load_scenario_2()
{
Console.WriteLine(">> Running Load 2");
}
}Each [Load] attribute defines:
order: the test execution orderconcurrency: number of parallel executionsduration: how long to run (in milliseconds)interval: delay between each wave of execution (in milliseconds)
Run your tests using:
dotnet testThe documentation for xUnitV3LoadFramework is currently in progress. Stay tuned for updates!
In the meantime, you can explore the examples for practical use cases and refer to the source code for detailed insights.
Examples: examples
Your contributions and feedback are always welcome!
- Submit issues or suggestions via GitHub Issues.
- Open pull requests following our Contributing Guidelines.
This project is licensed under the MIT License.
For questions, suggestions, or feedback, please open an issue or contact directly: