Skip to content
Ken Ahrens
Go back

Better integration tests in Cursor using proxymock

Originally published on speedscale.com.

Introduction: Cursor’s Missing Integration Tests

Cursor is fantastic at cranking out code changes. I recently used it to splice a brand-new downstream API call into one of our Go microservices, and the diff looked great. The unit tests finished before I lifted my coffee mug, yet I still had zero certainty the change would survive contact with real traffic. That gap is all about integration tests, so I paired Cursor with proxymock and the outerspace-go demo service to prove the behavior end to end.

Walkthrough of capturing live traffic with proxymock, replaying it inside Cursor, and reviewing the integration test diff.

outerspace-go endpoints

Cursor Ships Code, Not Integration Confidence

Cursor handled the boilerplate: request structs, wiring, even the env var plumbing required for the new downstream API. The pain starts immediately afterward. None of my existing unit tests touched the freshly added call, and spinning up the full stack to exercise it meant juggling:

Without those pieces, I’m stuck giving a thumbs-up to code I’ve never truly executed end-to-end. Worse, every iteration means waiting on flaky external systems, which is exactly what Cursor was meant to save me from. Integration testing in Cursor has to be faster than spending the rest of the week rebuilding a staging lab.

Capturing Real Traffic with proxymock Snapshots

ProxyMock gives me a fast path to reliable validation because it understands my service in situ. I already had the outerspace-go pods instrumented in-cluster, so from my laptop I can:

  1. Ask proxymock to download a fresh snapshot of live traffic—both inbound requests and outbound calls.
  2. Extract that snapshot locally so I can replay it at will.
  3. Inject extra calls that hit the new API path I just taught Cursor to create.

The snapshot becomes my golden tape. It’s the real payloads that hit /api/latest-launch, /api/numbers, and the new endpoint I just introduced, plus the precise responses the service emitted before my change. No amount of stubbed unit tests can give that fidelity. If you need a deeper walkthrough of building these recordings into CI, we documented the process in Automating API Mocks in Your CI Pipeline with proxymock.

Replaying Integration Tests Without the System

Instead of spending an eternity writing integration tests, I let Cursor orchestrate the flow with proxymock. I gave it the exact prompt:

Download a live snapshot of outerspace-go using proxymock and run integration tests

Cursor already understood the repo and how to run proxymock plus the go binaries, so it handled the terminal work. The MCP interface with proxymock automatically grabbed a snapshot of live traffic, launched the mock server, exported the proxy settings, and kicked off the integration tests. All I had to do was watch the transcript scroll by while proxymock replayed twenty recently recorded calls and generated a new set of observations tied to my branch.

Cursor orchestrating proxymock replay

The best part is that everything stays inside the IDE, and after it’s done I get a detailed summary of the result:

Snapshot download

Mock server

Application testing

New endpoint verification

Those observations show me if any of the endpoints deviated from live behavior. When something drifts, I can always drill down into a single interaction and compare headers, response codes, or even body snippets without re-running the whole stack.

proxymock drill down

Integration Checklist Before I Push

By the time I commit, I’ve validated more than “the new code compiles.” This is the key message:

Integration tests completed successfully. The new launches-summary endpoint works with proxymock snapshots, and every piece of recorded traffic was replayed against the application.

Cursor still saves me hours writing code, but proxymock is what prevents me from paying those hours back debugging production incidents.

Final Thoughts and Next Steps

Key takeaways

If Cursor is your fast-forward button, proxymock is the pause-and-scrub control that lets you prove every frame of the change. Working against outerspace-go makes it easy to demonstrate the flow, but the same pattern holds for any service that leans on third-party APIs: capture the real traffic, replay it locally, and let data—not optimism—decide whether your Cursor diff is ready to merge. Need help replicating this setup in your own stack? Book a Speedscale working session and we’ll walk through the proxymock workflow with your services.


Share this post:

Previous Post
Test Code Changes with Claude Code Using Real Traffic
Next Post
Part 1: Building a Production-Grade Traffic Capture and Replay System