Keploy as a .NET testing framework
Keploy tests .NET services by recording real HTTP and EF Core traffic from a running application, then replaying it as assertions. There are no Moq setups to write, no interface per service to inject, and no in-memory provider standing in for your real database.
keploy record -c "dotnet Orders.dll"What Keploy gives a .NET team
Any .NET service, unchanged
Keploy runs the assembly you publish. ASP.NET Core MVC, Minimal APIs, gRPC services, and Worker Services all record the same way, because capture happens at the socket rather than inside the middleware pipeline.
- .NET 6 and above
- Minimal APIs and MVC controllers
- Kestrel or IIS hosting
- No WebApplicationFactory needed
Why .NET integration tests slow teams down
The friction is rarely the assertions. It is everything around them — spinning up dependencies, keeping mocks honest, and repairing tests after every refactor.
Testing .NET: by hand, with xUnit + Moq, or with Keploy
Moq setups and an in-memory provider are both stand-ins written from your model of a dependency. Keploy records what the dependency actually returned, so a mock cannot quietly diverge from it.
Select any row for the full comparison, with code.
What you write for .NET vs what Keploy records
All three produce the same assertion. Only the third still passes after the next refactor without anyone editing it.
Two interfaces exist in production code purely so these fakes can be injected. Neither fake fails when the real Stripe or SQL contract changes.
Strongly typed and fast — and the in-memory provider never translates SQL, so a query bug reaches production unseen.
The mock is the SQL EF Core actually generated, parameter placeholders included — so a translation bug shows up as a diff instead of passing against an in-memory store.
Times are estimates for authoring one endpoint’s coverage from scratch, not measurements.
.NET testing tools, compared
The options a team on .NET actually reaches for, and where each one genuinely wins. Select a row for the full comparison.
Assessments reflect each tool’s documented behaviour, not benchmark measurements.
Record your .NET app once, replay it forever
Keploy sits below your .NET process at the network layer. It watches the calls your app already makes, then serves them back on replay so tests run with no dependencies attached.
Keploy records a GET call to /api/v1/orders/{id} on a .NET service and captures the dependency calls it makes.
What Keploy mocks for .NET, with zero config
7 of the 8 dependencies a typical .NET service talks to are stubbed from the recording itself — no mock classes, no fixture files, no containers in CI.
- Auto-mocked
SQL ServerView page
TDS protocol under EF Core and Dapper
- Auto-mocked
PostgreSQLView page
Postgres protocol under Npgsql
- Auto-mocked
MySQLView page
MySQL protocol under MySqlConnector
- Auto-mocked
RedisView page
RESP under StackExchange.Redis
- Auto-mocked
MongoDBView page
Wire protocol under the MongoDB .NET driver
- Auto-mocked
gRPCView page
HTTP/2 framed calls from Grpc.Net.Client
- Outbound HTTPAuto-mocked
Outbound HTTP
Any HttpClient or Refit call
- Partial
Azure Service Bus
AMQP over the Service Bus SDK
Your first .NET test suite in under five minutes
Every command below runs against your existing .NET service. Nothing in your source tree changes.
1Install the Keploy CLI
A single binary. It needs a Linux kernel with eBPF support, or Docker on macOS and Windows — and it adds nothing to your project's dependencies.
curl -sSL https://keploy.io/install.sh | bash2Record your service
Pass the command you already use to start the app. Keploy runs it and watches every socket it opens.
keploy record -c "dotnet Orders.dll"3Exercise the paths you care about
Publish as normal, then drive the app. Every request becomes a test case with its EF Core queries and HttpClient calls captured alongside.
dotnet publish -c Release -o outcurl -X POST localhost:5000/orders/ord_1/confirm -H 'Content-Type: application/json' -d '{"paymentToken":"tok_123"}'4Replay in CI
Replay serves the recorded dependency responses, so the job needs no service containers and no Docker daemon.
keploy test -c "dotnet Orders.dll" --delay 12
Ready to try it on your own .NET service?
Works with the rest of your .NET stack
Keploy records at the network layer, so framework and driver choices inside your .NET app do not change how it captures traffic.
ASP.NET Core
Recorded through Kestrel — the full middleware pipeline runs.
Entity Framework Core
Queries record as the SQL they translate to, with real rows.
Dapper
Raw SQL records at the protocol below the connection.
SQL Server
The database page covers TDS-level capture in depth.
Redis
StackExchange.Redis exchanges record in order.
gRPC
Grpc.Net.Client calls captured as HTTP/2 frames.
Testing the rest of your stack
- Databases
Keploy as a SQL Server testing framework
Mock SQL Server at the TDS protocol instead of standing up a container or swapping in an in-memory provider.
Read the guide - Databases
Keploy as a PostgreSQL testing framework
Record the Postgres frontend/backend protocol once and replay real result sets in tests — no container, no pg-mem, no schema to rebuild.
Read the guide - Caches & Stores
Keploy as a Redis testing framework
Record RESP traffic once and replay real cache hits, misses, TTLs, and pipeline responses without a Redis server in CI.
Read the guide - Cloud & Infra
Keploy as a gRPC testing framework
Record real gRPC exchanges over HTTP/2 and replay them as tests — no in-process stub server, no hand-written mock service implementation.
Read the guide - Databases
Keploy as a MongoDB testing framework
Mock MongoDB at the wire protocol — real documents, real BSON types, real aggregation results — without a mongod binary in CI.
Read the guide - Message Queues
Keploy as a Apache Kafka testing framework
Test producers and consumers against recorded broker exchanges — no embedded Kafka, no Testcontainers cluster, no flaky poll loops.
Read the guide
Join our GlobalCommunity
Connect with developers worldwide. Follow updates, ask questions, share feedback, and ship faster with other Keploy builders.
“Best report of integration and API tests I've seen — which we don't get from RestAssured.”
G2“Future of microservices testing. I don't write tests now!”
G2 · 5/5“An amazing product that simplifies the automation.”
Gartner · 4.0