WireMock.Net
WireMock.Net is a C# HTTP mocking library that lets you stub and mock web responses for testing. It can run as a library in tests, a standalone service, or in Docker, and supports advanced features like request matching, response templating, gRPC, and GraphQL.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | wiremock/WireMock.Net |
| Owner | wiremock |
| Primary language | C# |
| License | Apache-2.0 — OSI-approved |
| Stars | 1.7k |
| Forks | 240 |
| Open issues | 23 |
| Latest release | 2.12.0 (2026-07-07) |
| Last updated | 2026-07-07 |
| Source | https://github.com/wiremock/WireMock.Net |
What WireMock.Net is
WireMock.Net provides HTTP response stubbing with URL/header/body matching, runs embedded or as a standalone process, supports Handlebars templating, record/playback, stateful behavior, gRPC/ProtoBuf, and integrates with .NET testing frameworks, Aspire, and container platforms.
Get the WireMock.Net source
Clone the repository and explore it locally.
git clone https://github.com/wiremock/WireMock.Net.gitcd WireMock.Net# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Start with the embedded library (WireMock.Net) in unit tests; graduate to WireMock.Net.StandAlone or WireMock.Net.Testcontainers for integration tests or cross-service testing.
- Use Handlebars templating and conditional proxying to simulate stateful behavior (e.g., API state changes), but test template logic carefully to avoid test brittleness.
- Multiple NuGet packages exist (WireMock.Net, WireMock.Net.Minimal, WireMock.Net.AspNetCore.Middleware); choose based on your dependency footprint and test framework (xUnit, NUnit, TUnit, etc.).
- Record/playback feature can seed stubs from real APIs; validate generated stubs manually before committing to test suites to prevent false positives.
- Configure request matching rules precisely (body patterns, headers, URLs) to avoid over-broad stubs that mask real integration bugs.
When to avoid it — and what to weigh
- You need production request interception — WireMock.Net is designed for testing and local development, not as a production proxy or gateway; using it in production traffic paths is not a supported use case.
- Your team uses only non-.NET ecosystems — While it can stub any HTTP endpoint, WireMock.Net is a C# library optimized for .NET applications; Java/Node.js teams should consider the original WireMock or equivalent stubs.
- You require TLS/mTLS client certificate validation — Not clearly documented in the provided data; verify if certificate pinning, client auth, or advanced SSL scenarios are supported before committing to this tool.
- You need stateless, low-latency stub matching at extreme scale — WireMock.Net uses in-memory request matching; performance under millions of concurrent stubs or extremely high throughput scenarios is unknown.
License & commercial use
Licensed under Apache License 2.0 (Apache-2.0), a permissive OSI-approved license permitting commercial, private, and derivative use with attribution and liability disclaimers.
Apache-2.0 permits commercial use, including in proprietary products, without royalties. Derivative works must include notice of modifications and a copy of the license. No warranty or indemnity is provided; review your legal team's risk tolerance for third-party library liability in mission-critical testing pipelines.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Strong |
| Assessment confidence | High |
WireMock.Net intercepts and stores HTTP requests and responses for matching and logging; ensure mock instances do not capture or expose real credentials, API keys, or PII in test logs. Use response masking or sanitization if storing sensitive data in stubs. No information provided on encryption at rest, input validation, or vulnerability disclosure process; review source code for sensitive-data handling if using in regulated environments.
Alternatives to consider
WireMock (Java / WireMock Cloud)
Original project with larger ecosystem, browser-based UI, and managed cloud offering; choose if you need platform-agnostic mocking or prefer managed infrastructure.
Moq / NSubstitute (C#)
Lightweight in-process mocking libraries for unit tests; simpler for testing method calls but lack HTTP stubbing, record/playback, and standalone server features.
Prism (Mock Server)
OpenAPI-first mock server with built-in documentation; better if you design APIs with OpenAPI-first discipline and need less .NET-specific integration.
Build on WireMock.Net with DEV.co software developers
Evaluate WireMock.Net for your test suite. Start with the embedded library in xUnit or NUnit, then scale to standalone services or containers. Apache-2.0 licensed and actively maintained.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
WireMock.Net FAQ
Can I use WireMock.Net to mock non-HTTP protocols?
Does WireMock.Net persist stubs across restarts?
Is WireMock.Net suitable for performance testing?
Can I use WireMock.Net in a CI/CD pipeline?
Custom software development services
Need help beyond evaluating WireMock.Net? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source testing integrations — and maintain them long-term.
Ready to Mock HTTP Dependencies in .NET?
Evaluate WireMock.Net for your test suite. Start with the embedded library in xUnit or NUnit, then scale to standalone services or containers. Apache-2.0 licensed and actively maintained.