WireMock.Net
1.22.0
Prefix Reserved
See the version list below for details.
dotnet add package WireMock.Net --version 1.22.0
NuGet\Install-Package WireMock.Net -Version 1.22.0
<PackageReference Include="WireMock.Net" Version="1.22.0" />
<PackageVersion Include="WireMock.Net" Version="1.22.0" />
<PackageReference Include="WireMock.Net" />
paket add WireMock.Net --version 1.22.0
#r "nuget: WireMock.Net, 1.22.0"
#:package WireMock.Net@1.22.0
#addin nuget:?package=WireMock.Net&version=1.22.0
#tool nuget:?package=WireMock.Net&version=1.22.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 is compatible. net5.0-windows was computed. net6.0 is compatible. 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 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. 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 | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
| .NET Standard | netstandard1.3 is compatible. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net451 is compatible. net452 is compatible. net46 is compatible. net461 is compatible. net462 was computed. 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 | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
| Universal Windows Platform | uap was computed. uap10.0 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- System.Text.RegularExpressions (>= 4.3.1)
- WireMock.Net.GraphQL (>= 1.22.0)
- WireMock.Net.MimePart (>= 1.22.0)
- WireMock.Net.Minimal (>= 1.22.0)
- WireMock.Net.ProtoBuf (>= 1.22.0)
-
.NETFramework 4.5.1
- System.Text.RegularExpressions (>= 4.3.1)
- WireMock.Net.Minimal (>= 1.22.0)
-
.NETFramework 4.5.2
- System.Text.RegularExpressions (>= 4.3.1)
- WireMock.Net.Minimal (>= 1.22.0)
-
.NETFramework 4.6
- System.Text.RegularExpressions (>= 4.3.1)
- WireMock.Net.Minimal (>= 1.22.0)
-
.NETFramework 4.6.1
- System.Text.RegularExpressions (>= 4.3.1)
- WireMock.Net.Minimal (>= 1.22.0)
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.1)
- System.Text.RegularExpressions (>= 4.3.1)
- WireMock.Net.Minimal (>= 1.22.0)
-
.NETStandard 2.0
- System.Text.RegularExpressions (>= 4.3.1)
- WireMock.Net.GraphQL (>= 1.22.0)
- WireMock.Net.MimePart (>= 1.22.0)
- WireMock.Net.Minimal (>= 1.22.0)
- WireMock.Net.ProtoBuf (>= 1.22.0)
-
.NETStandard 2.1
- System.Text.RegularExpressions (>= 4.3.1)
- WireMock.Net.GraphQL (>= 1.22.0)
- WireMock.Net.MimePart (>= 1.22.0)
- WireMock.Net.Minimal (>= 1.22.0)
- WireMock.Net.ProtoBuf (>= 1.22.0)
-
net5.0
- System.Text.RegularExpressions (>= 4.3.1)
- WireMock.Net.GraphQL (>= 1.22.0)
- WireMock.Net.MimePart (>= 1.22.0)
- WireMock.Net.Minimal (>= 1.22.0)
- WireMock.Net.ProtoBuf (>= 1.22.0)
-
net6.0
- System.Text.RegularExpressions (>= 4.3.1)
- WireMock.Net.GraphQL (>= 1.22.0)
- WireMock.Net.MimePart (>= 1.22.0)
- WireMock.Net.Minimal (>= 1.22.0)
- WireMock.Net.ProtoBuf (>= 1.22.0)
-
net7.0
- System.Text.RegularExpressions (>= 4.3.1)
- WireMock.Net.GraphQL (>= 1.22.0)
- WireMock.Net.MimePart (>= 1.22.0)
- WireMock.Net.Minimal (>= 1.22.0)
- WireMock.Net.ProtoBuf (>= 1.22.0)
-
net8.0
- System.Text.RegularExpressions (>= 4.3.1)
- WireMock.Net.GraphQL (>= 1.22.0)
- WireMock.Net.MimePart (>= 1.22.0)
- WireMock.Net.Minimal (>= 1.22.0)
- WireMock.Net.ProtoBuf (>= 1.22.0)
NuGet packages (26)
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.11.0 | 52,230 | 6/12/2026 |
| 2.10.0 | 53,515 | 6/7/2026 |
| 2.9.0 | 39,169 | 6/2/2026 |
| 2.8.0 | 30,804 | 5/31/2026 |
| 2.7.0 | 84,496 | 5/24/2026 |
| 2.6.0 | 323,049 | 5/11/2026 |
| 2.5.0 | 140,247 | 5/4/2026 |
| 2.4.0 | 210,712 | 4/24/2026 |
| 2.3.0 | 93,855 | 4/20/2026 |
| 2.2.0 | 655,056 | 3/30/2026 |
| 2.1.0 | 27,947 | 3/29/2026 |
| 2.0.0 | 251,367 | 3/11/2026 |
| 1.25.0 | 1,221,239 | 1/25/2026 |
| 1.24.0 | 140,848 | 1/18/2026 |
| 1.23.0 | 329,579 | 1/5/2026 |
| 1.22.0 | 61,147 | 1/2/2026 |
| 1.21.0 | 187,570 | 12/25/2025 |
| 1.20.0 | 11,635 | 12/24/2025 |
| 1.19.0 | 308,846 | 12/12/2025 |
| 1.18.0 | 233,499 | 12/9/2025 |
# 1.22.0 (02 January 2026)
- #1412 chore(testcontainers): bump up Testcontainers to version 4.10.0 [feature]
- #1411 WireMock.Net.Testcontainers isn't compatible with Testcontainers 4.10.0 [bug]
The full release notes can be found here: https://github.com/wiremock/WireMock.Net/blob/master/CHANGELOG.md