MarkopTest 3.0.0

dotnet add package MarkopTest --version 3.0.0
                    
NuGet\Install-Package MarkopTest -Version 3.0.0
                    
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="MarkopTest" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MarkopTest" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="MarkopTest" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MarkopTest --version 3.0.0
                    
#r "nuget: MarkopTest, 3.0.0"
                    
#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.
#:package MarkopTest@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MarkopTest&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=MarkopTest&version=3.0.0
                    
Install as a Cake Tool

Markop Test

NuGet NuGet Downloads MIT License GitHub stars

Markop Test is an open-source testing toolkit for ASP.NET applications. It provides reusable factories to build unit, integration, functional, and load tests on top of xUnit with minimal boilerplate.

Why Markop Test

  • Reduces setup code for web-hosted tests
  • Supports endpoint-oriented integration testing
  • Enables scenario-style functional tests
  • Generates HTML reports for load testing
  • Integrates with standard xUnit workflows

Supported Frameworks

Markop Test currently targets:

  • .NET 8
  • .NET 9
  • .NET 10

Installation

Install from NuGet in your test project:

Install-Package MarkopTest

Or with the .NET CLI:

dotnet add package MarkopTest

Quick Start

  1. Create a test project (class library or xUnit project).
  2. Add a reference to the application project you want to test.
  3. Install MarkopTest.
  4. Create an AppFactory class that inherits one of the test factories.
  5. Write tests by inheriting from your AppFactory.

Example project creation:

dotnet new classlib -n IntegrationTest
dotnet sln add IntegrationTest
dotnet add IntegrationTest package MarkopTest

Core Concepts

Factory-Based Setup

Each test style has a factory base class:

  • UnitTestFactory<TStartup>
  • IntegrationTestFactory<TStartup, TFetchOptions>
  • FunctionalTestFactory<TStartup>
  • LoadTestFactory<TStartup>

You typically override these members:

  • Initializer(IServiceProvider hostServices) to seed data and prepare test state
  • ConfigureTestServices(IServiceCollection services) to replace or mock dependencies
  • GetUrl(string url, string controllerName, string testMethodName) for integration/load routing
  • ValidateResponse(HttpResponseMessage response, TFetchOptions options) for integration assertions

Endpoint Routing Attribute

Use [Endpoint("...")] on test classes or methods. Markop Test replaces:

  • [controller] with test class name (suffixes like Test, Tests, and Controller are removed)
  • [action] with the current test method name

Test Types

Unit Tests

Use UnitTestFactory when testing isolated application behavior while still having host and DI access.

Integration Tests

Use IntegrationTestFactory to send HTTP requests to your in-memory test server and validate full pipeline behavior.

Functional Tests

Use FunctionalTestFactory for end-to-end business scenarios composed of multiple integration-level actions.

Load Tests

Use LoadTestFactory to execute synchronous and asynchronous request batches and export performance reports to LoadTestResult/....

Documentation

Sample Project

The sample/ directory demonstrates real usage:

  • sample/test/UnitTest
  • sample/test/IntegrationTest
  • sample/test/FunctionalTest
  • sample/test/LoadTest

Run sample tests:

dotnet test sample/test/UnitTest/UnitTest.csproj
dotnet test sample/test/IntegrationTest/IntegrationTest.csproj
dotnet test sample/test/FunctionalTest/FunctionalTest.csproj
dotnet test sample/test/LoadTest/LoadTest.csproj

Contributing

Contributions are welcome. Please open an issue or pull request describing the problem, proposed solution, and test coverage.

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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
3.0.0 92 5/5/2026
2.2.1 449 12/12/2023
2.2.0 405 3/21/2023
2.1.1 417 2/27/2023
2.1.0 660 8/31/2022
2.0.0 733 5/18/2022
1.6.0 764 3/27/2022
1.5.0 785 2/27/2022
1.4.13 881 12/10/2021
1.4.12 956 7/30/2021
1.4.11 624 7/30/2021
1.4.10 610 7/30/2021
1.4.9 637 7/29/2021
1.4.8 623 7/29/2021
1.4.7 654 7/29/2021
1.4.6 592 7/28/2021
1.4.5 558 7/27/2021
1.4.4 623 7/27/2021
1.4.3 601 7/27/2021
1.4.2 610 7/20/2021
Loading failed