MarkopTest 3.0.0
dotnet add package MarkopTest --version 3.0.0
NuGet\Install-Package MarkopTest -Version 3.0.0
<PackageReference Include="MarkopTest" Version="3.0.0" />
<PackageVersion Include="MarkopTest" Version="3.0.0" />
<PackageReference Include="MarkopTest" />
paket add MarkopTest --version 3.0.0
#r "nuget: MarkopTest, 3.0.0"
#:package MarkopTest@3.0.0
#addin nuget:?package=MarkopTest&version=3.0.0
#tool nuget:?package=MarkopTest&version=3.0.0
Markop Test
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
- Create a test project (class library or xUnit project).
- Add a reference to the application project you want to test.
- Install
MarkopTest. - Create an
AppFactoryclass that inherits one of the test factories. - 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 stateConfigureTestServices(IServiceCollection services)to replace or mock dependenciesGetUrl(string url, string controllerName, string testMethodName)for integration/load routingValidateResponse(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 likeTest,Tests, andControllerare 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/UnitTestsample/test/IntegrationTestsample/test/FunctionalTestsample/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 | Versions 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. |
-
net10.0
- Hardware.Info (>= 101.1.1.1)
- Microsoft.AspNetCore.Mvc.Testing (>= 10.0.7)
- Microsoft.NET.Test.Sdk (>= 18.5.1)
- xunit (>= 2.9.3)
-
net8.0
- Hardware.Info (>= 101.1.1.1)
- Microsoft.AspNetCore.Mvc.Testing (>= 8.0.26)
- Microsoft.NET.Test.Sdk (>= 18.5.1)
- xunit (>= 2.9.3)
-
net9.0
- Hardware.Info (>= 101.1.1.1)
- Microsoft.AspNetCore.Mvc.Testing (>= 9.0.15)
- Microsoft.NET.Test.Sdk (>= 18.5.1)
- xunit (>= 2.9.3)
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 | 93 | 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 | 611 | 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 |