A mock server for every pull request
Add one step to a GitHub workflow and every branch and pull request gets a mock API URL of its own. Reviewers test the integration before the merge instead of finding out after it.
- A URL per branch
- Updated on every push
- Removed when the PR closes
- GitHub Action
Mock server for this pull request is live.
What is a PR preview environment?
A mock server that exists for one branch. Add the Mockzilla action to a workflow you already have, and every push deploys the repository's specs and posts the branch's URL back to its pull request.
It follows the branch, and it leaves with it. Close the pull request and the deployment is torn down, so nothing stale is left answering.
You cannot tell from the diff
A diff on an OpenAPI file tells you a field was renamed. It does not tell you whether the client still works, and the one shared mock everybody points at has already moved on to somebody else's branch.
A URL per pull request turns the question into something you can call. The reviewer runs the client against that branch's own API before the merge.
A URL per branch and pull request
Each pull request gets an address of its own, so two people reviewing two branches are never looking at the same mock.
Updated on every push
Change the spec in the branch and the mock behind that URL follows on the next push. Nobody has to redeploy anything.
Cleaned up automatically
When the pull request closes, its mock server goes with it. No stale URLs and nothing left running.
Questions
- Do I need an account first?
- No. The first push registers the repository and the mock answers before anyone has signed up. Sign in with GitHub later and the mocks are already there, with history, replays and usage.
- What happens when the pull request closes?
- Its deployment goes with it, so nothing is left running and no URL keeps answering after the branch is gone.
- Can I keep a permanent URL as well?
- Yes. The default branch keeps a stable URL of its own, and the per-branch ones sit alongside it.
Bring a spec. Get a mock server.
It costs nothing to start. Dedicated infrastructure when you need it.