ProtoTest.WireMock 1.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ProtoTest.WireMock --version 1.1.1
                    
NuGet\Install-Package ProtoTest.WireMock -Version 1.1.1
                    
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="ProtoTest.WireMock" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ProtoTest.WireMock" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="ProtoTest.WireMock" />
                    
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 ProtoTest.WireMock --version 1.1.1
                    
#r "nuget: ProtoTest.WireMock, 1.1.1"
                    
#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 ProtoTest.WireMock@1.1.1
                    
#: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=ProtoTest.WireMock&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=ProtoTest.WireMock&version=1.1.1
                    
Install as a Cake Tool

ProtoTest.WireMock

Preview: the surface can change before 1.2.

Fake HTTP services for ProtoTest suites, backed by WireMock.Net: stub a dependency per test, read the matched requests in the trace with the REST response shape, and cover the stubs.

dotnet add package ProtoTest.WireMock
builder.AddWireMock("Payments");

var fake = Proto.Context.WireMock("Payments");
fake.Stub("GET", "/balance/*").RespondJson(HttpStatusCode.OK, new { available = 1200 });

// point the system under test at fake.BaseUrl, then act and assert on it
fake.VerifyNoUnmatchedRequests();

Includes

  • AddWireMock(name) registration; Proto.Context.WireMock(name) starts the fake on first use.
  • Per-test servers by default; PerRun() shares one server, its stubs and its request log across the run (cleared by Reset() or the run's release); Port(n) listens on a fixed port.
  • Stubbing through Stub(method, path) with RespondWith/RespondJson, plus the raw Given/Server escape hatches for matchers the facade does not cover.
  • Matched requests traced as http.response observations with the REST response payload; unmatched requests as http.failure, so they never count as covered.
  • A WireMock coverage collector, registered automatically per fake: registered stubs are gaps until a matched request covers them.

Limits

  • HTTP only: the fake serves stubbed HTTP responses; it does not proxy, record, or validate against an OpenAPI document.
  • Response headers are whatever WireMock logs for the entry, usually empty; the status, body and request URL are always recorded, with the shared HTTP redaction applied.
  • A per-run fake is shared: its stubs and request log live for the whole run, parallel tests share the log, and observations are attributed to the test whose teardown observed them. Call Reset() to clear the shared fake between tests.
  • A fixed-port fake cannot be shared by parallel tests.
  • The server stops with its owner (the test, or the run); assert ReceivedCount and ReceivedRequests before the test completes.

Learn more

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
1.1.6 0 10/4/2026
1.1.5 7 10/3/2026
1.1.4 38 10/3/2026
1.1.3 32 10/3/2026
1.1.2 33 10/3/2026
1.1.1 43 10/2/2026
1.1.0 62 10/2/2026