WireMock.Net
2.6.0
Prefix Reserved
See the version list below for details.
dotnet add package WireMock.Net --version 2.6.0
NuGet\Install-Package WireMock.Net -Version 2.6.0
<PackageReference Include="WireMock.Net" Version="2.6.0" />
<PackageVersion Include="WireMock.Net" Version="2.6.0" />
<PackageReference Include="WireMock.Net" />
paket add WireMock.Net --version 2.6.0
#r "nuget: WireMock.Net, 2.6.0"
#:package WireMock.Net@2.6.0
#addin nuget:?package=WireMock.Net&version=2.6.0
#tool nuget:?package=WireMock.Net&version=2.6.0
WireMock.Net
Lightweight Http Mocking Server for .NET, inspired by WireMock.org (from the Java landscape).
⭐ Key Features
- HTTP response stubbing, matchable on URL/Path, headers, cookies and body content patterns
- Library can be used in unit tests and integration tests
- Runs as a standalone process, as windows service, as Azure/IIS or as docker
- Configurable via a fluent C# .NET API, JSON files and JSON over HTTP
- Record/playback of stubs (proxying)
- Per-request conditional proxying
- Stateful behaviour simulation
- Response templating / transformation using Handlebars and extensions
- Can be used locally or in CI/CD scenarios
- Can be used for Aspire Distributed Application testing
⭐ Stubbing
A core feature of WireMock.Net is the ability to return predefined HTTP responses for requests matching criteria. See Stubbing.
⭐ Request Matching
WireMock.Net support advanced request-matching logic, see Request Matching.
⭐ Response Templating
The response which is returned WireMock.Net can be changed using templating. This is described here Response Templating.
⭐ Admin API Reference
The WireMock admin API provides functionality to define the mappings via a http interface see Admin API Reference.
⭐ Using
WireMock.Net can be used in several ways:
UnitTesting
You can use your favorite test framework and use WireMock within your tests, see UnitTesting.
Unit/Integration Testing using Testcontainers.DotNet
See WireMock.Net.Testcontainers on how to build a WireMock.Net Docker container which can be used in Unit/Integration testing.
Unit/Integration Testing using an an Aspire Distributed Application
See WireMock.Net.Aspire on how to use WireMock.Net as an Aspire Hosted application to do Unit/Integration testing.
As a dotnet tool
It's simple to install WireMock.Net as (global) dotnet tool, see dotnet tool.
As standalone process / console application
This is quite straight forward to launch a mock server within a console application, see Standalone Process.
As a Windows Service
You can also run WireMock.Net as a Windows Service, follow this Windows Service.
As a Web Job in Azure or application in IIS
See this link WireMock-as-a-(Azure)-Web-App
In a docker container
There is also a Linux and Windows-Nano container available at hub.docker.com. For more details see also Docker.
HTTPS / SSL
More details on using HTTPS (SSL) can be found here HTTPS
📚 Documentation
For more info, see also this documentation page: What is WireMock.Net.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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. net9.0 was computed. 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 was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- WireMock.Net.GraphQL (>= 2.6.0)
- WireMock.Net.MimePart (>= 2.6.0)
- WireMock.Net.Minimal (>= 2.6.0)
- WireMock.Net.OpenTelemetry (>= 2.6.0)
- WireMock.Net.ProtoBuf (>= 2.6.0)
-
.NETStandard 2.1
- WireMock.Net.GraphQL (>= 2.6.0)
- WireMock.Net.MimePart (>= 2.6.0)
- WireMock.Net.Minimal (>= 2.6.0)
- WireMock.Net.OpenTelemetry (>= 2.6.0)
- WireMock.Net.ProtoBuf (>= 2.6.0)
-
net8.0
- WireMock.Net.GraphQL (>= 2.6.0)
- WireMock.Net.MimePart (>= 2.6.0)
- WireMock.Net.Minimal (>= 2.6.0)
- WireMock.Net.OpenTelemetry (>= 2.6.0)
- WireMock.Net.ProtoBuf (>= 2.6.0)
NuGet packages (25)
Showing the top 5 NuGet packages that depend on WireMock.Net:
| Package | Downloads |
|---|---|
|
WireMock.Net.StandAlone
Lightweight StandAlone Http Mocking Server for .Net. |
|
|
Energinet.DataHub.Core.FunctionApp.TestCommon
[Release Notes](https://github.com/Energinet-DataHub/geh-core/blob/master/source/TestCommon/documents/release-notes/release-notes.md) [Documentation](https://github.com/Energinet-DataHub/geh-core/blob/master/source/TestCommon/documents/documentation.md) |
|
|
Cortside.MockServer
Package Description |
|
|
DrifterApps.Seeds.Testing
Package Description |
|
|
OpenTraceability.TestServerPackage
A packaged version of a test server that can be deployed and used prop up a dummy EPCIS/Digital Link resolver.. |
GitHub repositories (29)
Showing the top 20 popular GitHub repositories that depend on WireMock.Net:
| Repository | Stars |
|---|---|
|
restsharp/RestSharp
Simple REST and HTTP API Client for .NET
|
|
|
rabbitmq/rabbitmq-dotnet-client
RabbitMQ .NET client for .NET Standard 2.0+ and .NET 4.6.2+
|
|
|
Nethereum/Nethereum
Ethereum .Net cross platform integration library
|
|
|
kubernetes-client/csharp
Officially supported dotnet Kubernetes Client library
|
|
|
mehdihadeli/food-delivery-microservices
🍔 A practical and cloud-native food delivery microservices, built with .Net Aspire, .Net 9, MassTransit, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
|
|
|
CodeMazeBlog/CodeMazeGuides
The main repository for all the Code Maze guides
|
|
|
junkai-li/NetCoreKevin
🤖基于.NET搭建的企业级中台AI知识库智能体开源架构:Skills技能管理、AI-Qdrant知识库、知识库重排模型、AI联网搜索、智能体权限管控、AgentFramework、RAG检索增强、本地Ollama AI模型调用、智能体技能可控加载、领域事件、一库多租户、Log4、Jwt、CAP、SignalR、Mcp、Ioc、Hangfire、RabbitMQ、Xunit、前端(Vue + Ant Design)
|
|
|
jellyfin/TMDbLib
C#.Net library for TheMovieDB
|
|
|
SonarSource/sonar-scanner-msbuild
SonarScanner for .NET
|
|
|
JasonBock/Rocks
A mocking library based on the Compiler APIs (Roslyn + Mocks)
|
|
|
influxdata/influxdb-client-csharp
InfluxDB 2.x C# Client
|
|
|
maxmind/GeoIP2-dotnet
MaxMind GeoIP2 .NET API
|
|
|
auth0/auth0.net
.NET client for the Auth0 Authentication & Management APIs.
|
|
|
axzxs2001/Asp.NetCoreExperiment
原来所有项目都移动到**OleVersion**目录下进行保留。新的案例装以.net 5.0为主,一部分对以前案例进行升级,一部分将以前的工作经验总结出来,以供大家参考!
|
|
|
dotnetrdf/dotnetrdf
dotNetRDF is a powerful and flexible API for working with RDF and SPARQL in .NET environments
|
|
|
mehdihadeli/vertical-slice-api-template
🍰 An asp.net core template based on .Net 9, Vertical Slice Architecture, CQRS, Minimal APIs, OpenTelemetry, API Versioning and OpenAPI.
|
|
|
hassanhabib/Standard.AI.OpenAI
Standard-Compliant .NET library for Open AI
|
|
|
hassanhabib/RESTFulSense
A RESTFul operations client that serializes responses and throws meaningful exceptions for >= 400 status codes.
|
|
|
notion-dotnet/notion-sdk-net
A Notion SDK for .Net
|
|
|
basdijkstra/rest-assured-net
C# DSL for writing readable tests for HTTP-based APIs
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.10.0 | 6,715 | 6/7/2026 |
| 2.9.0 | 21,872 | 6/2/2026 |
| 2.8.0 | 20,611 | 5/31/2026 |
| 2.7.0 | 61,773 | 5/24/2026 |
| 2.6.0 | 231,218 | 5/11/2026 |
| 2.5.0 | 114,287 | 5/4/2026 |
| 2.4.0 | 181,703 | 4/24/2026 |
| 2.3.0 | 83,269 | 4/20/2026 |
| 2.2.0 | 632,925 | 3/30/2026 |
| 2.1.0 | 25,666 | 3/29/2026 |
| 2.0.0 | 231,301 | 3/11/2026 |
| 1.25.0 | 1,147,840 | 1/25/2026 |
| 1.24.0 | 133,984 | 1/18/2026 |
| 1.23.0 | 311,071 | 1/5/2026 |
| 1.22.0 | 59,764 | 1/2/2026 |
| 1.21.0 | 177,646 | 12/25/2025 |
| 1.20.0 | 11,254 | 12/24/2025 |
| 1.19.0 | 291,679 | 12/12/2025 |
| 1.18.0 | 220,413 | 12/9/2025 |
| 1.17.0 | 69,315 | 12/7/2025 |
# 2.6.0 (11 May 2026)
- #1455 Fix request storing when RequestLogExpirationDuration is set [bug] [bug]
- #1454 No requests stored in Standalone when RequestLogExpirationDuration is set [bug]
The full release notes can be found here: https://github.com/wiremock/WireMock.Net/blob/master/CHANGELOG.md