wiremock-net - WireMock.Net.RestClient 2.0.0-preview-01
A RestClient using RestEase to access the admin interface.
PM> Install-Package WireMock.Net.RestClient -Version 2.0.0-preview-01 -Source https://www.myget.org/F/wiremock-net/api/v3/index.json
> nuget.exe install WireMock.Net.RestClient -Version 2.0.0-preview-01 -Source https://www.myget.org/F/wiremock-net/api/v3/index.json
> dotnet add package WireMock.Net.RestClient --version 2.0.0-preview-01 --source https://www.myget.org/F/wiremock-net/api/v3/index.json
source https://www.myget.org/F/wiremock-net/api/v3/index.json
nuget WireMock.Net.RestClient ~> 2.0.0-preview-01
Copy to clipboard
> choco install WireMock.Net.RestClient --version 2.0.0-preview-01 --source https://www.myget.org/F/wiremock-net/api/v2
Import-Module PowerShellGet
Register-PSRepository -Name "wiremock-net" -SourceLocation "https://www.myget.org/F/wiremock-net/api/v2"
Install-Module -Name "WireMock.Net.RestClient" -RequiredVersion "2.0.0-preview-01" -Repository "wiremock-net" -AllowPreRelease
Copy to clipboard
WireMock.Net
A C# .NET version based on mock4net which mimics functionality from the original Java based WireMock.
:books: Full documentation can now be found at wiremock.org
:star: 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
:memo: Blogs
- mstack.nl : Generate C# Code from Mapping(s)
- mstack.nl : Chaos Engineering with Fault Injections
- mstack.nl : gRPC / ProtoBuf Support
- mstack.nl : Build and test your own .NET Aspire component
:computer: Project Info
| Project | |
| Chat | |
| Issues | |
| Quality | |
| Build Azure | |
| Quality | |
| Sonar Bugs | |
| Coverage | |
| TIOBE | TIOBE Quality Indicator |
:package: NuGet packages
| Official | Preview :information_source: | |
|---|---|---|
| WireMock.Net | ||
| WireMock.Net.Minimal 🔺 | ||
| WireMock.Net.StandAlone | ||
| WireMock.Net.Testcontainers | ||
| WireMock.Net.Aspire | ||
| WireMock.Net.AspNetCore.Middleware | ||
| WireMock.Net.AwesomeAssertions | ||
| WireMock.Net.FluentAssertions | ||
| WireMock.Net.xUnit | ||
| WireMock.Net.xUnit.v3 | ||
| WireMock.Net.TUnit | ||
| WireMock.Net.Extensions.Routing | ||
| WireMock.Net.Matchers.CSharpCode | ||
| WireMock.Net.OpenApiParser | ||
| WireMock.Net.MimePart | ||
| WireMock.Net.GraphQL | ||
| WireMock.Net.ProtoBuf | ||
| WireMock.Net.RestClient | ||
| WireMock.Org.RestClient |
🔺 WireMock.Net.Minimal does not include WireMock.Net.MimePart, WireMock.Net.GraphQL and WireMock.Net.ProtoBuf.
:exclamation: Breaking changes
1.7.0
A breaking change is introduced which is related to System.Linq.Dynamic.Core DynamicLinq (CVE).
- The
LinqMatcheris not allowed. - The Handlebars.Net.Helpers.DynamicLinq package is not included anymore.
1.8.0
Some breaking changes are introduced in this version:
Handlebars.Net File-helper
By default, the internal Handlebars.Net File-helper is not allowed anymore because of potential security issues.
To still enable this feature, you need to set the AllowedCustomHandlebarHelpers property to File in the HandlebarsSettings property in WireMockServerSettings.
Handlebars.Net Environment-helper
By default, the Handlebars.Net Environment-helper is not automatically allowed anymore because of potential security issues.
To still enable this feature, you need to add the Environment category to the AllowedHandlebarsHelpers list-property in the HandlebarsSettings property in WireMockServerSettings.
:memo: Development
For the supported frameworks and build information, see this page.
:star: Stubbing
A core feature of WireMock.Net is the ability to return predefined HTTP responses for requests matching criteria. See Stubbing.
:star: Request Matching
WireMock.Net support advanced request-matching logic, see Request Matching.
:star: Response Templating
The response which is returned WireMock.Net can be changed using templating. This is described here Response Templating.
:star: Admin API Reference
The WireMock admin API provides functionality to define the mappings via a http interface see Admin API Reference.
:star: 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
:books: Documentation
For more info, see also this documentation page: What is WireMock.Net.
Powered by
1.14.0 (06 October 2025)
- #1362 Update ProxyUrlReplaceSettingsModel with TransformTemplate property [feature]
- #1363 Add Tls13 [bug]
- #1342 Facing SSL certificate validation error when using .NET 5 and above framework for some http services during recording [bug]
- #1360 ProxyURL path configuration [feature]
The full release notes can be found here: https://github.com/wiremock/WireMock.Net/blob/master/CHANGELOG.md
-
.NETFramework 4.8
- JsonConverter.Newtonsoft.Json (>= 0.7.2)
- RestEase (>= 1.6.4)
- Stef.Validation (>= 0.2.0)
- WireMock.Net.Abstractions (>= 2.0.0-preview-01)
-
.NETFramework 8.0
- JsonConverter.Newtonsoft.Json (>= 0.7.2)
- RestEase (>= 1.6.4)
- Stef.Validation (>= 0.2.0)
- WireMock.Net.Abstractions (>= 2.0.0-preview-01)
- .NETFramework 4.8: 4.8.0.0
- .NETFramework 8.0: 8.0.0.0
OwnersStef |
AuthorsStef Heyenrath |
Project URLhttps://github.com/wiremock/WireMock.Net |
LicenseUnknown |
Tagswiremock rest client restclient restease json |
Info368 total downloads |
| 50 downloads for version 2.0.0-preview-01 |
| Download (62 KB) |
| Found on the current feed only |
Package history
| Version | Size | Last updated | Downloads | Mirrored? | |||
|---|---|---|---|---|---|---|---|
|
|
2.0.0-preview-01 | 62 KB | Mon, 06 Oct 2025 15:24:14 GMT | 50 |
|
||
|
|
1.16.0 | 103.34 KB | Tue, 18 Nov 2025 18:09:23 GMT | 2 |
|
||
|
|
1.15.0 | 103.23 KB | Tue, 18 Nov 2025 17:59:04 GMT | 14 |
|
||
|
|
1.14.0 | 103.31 KB | Wed, 22 Oct 2025 08:52:30 GMT | 22 |
|
||
|
|
1.14.0-preview-01 | 103.37 KB | Mon, 06 Oct 2025 07:35:48 GMT | 32 |
|
||
|
|
1.13.0 | 103.21 KB | Sun, 05 Oct 2025 14:09:55 GMT | 34 |
|
||
|
|
1.12.0 | 103.21 KB | Sun, 28 Sep 2025 11:01:41 GMT | 52 |
|
||
|
|
1.10.0-ci-110424 | 103.33 KB | Mon, 18 Aug 2025 18:44:15 GMT | 51 |
|
||
|
|
1.9.1-ci-110423 | 103.35 KB | Mon, 18 Aug 2025 18:12:48 GMT | 51 |
|
||
|
|
1.9.1-ci-110413 | 103.34 KB | Sun, 17 Aug 2025 08:28:14 GMT | 60 |
|