Skip to content

docs: add a Universal Mocker section to the navbar and sidebar - #987

Merged
slayerjain merged 4 commits into
mainfrom
docs/universal-mocker-next
Nov 19, 2026
Merged

slayerjain merged 4 commits into
mainfrom
docs/universal-mocker-next

Conversation

@slayerjain

Copy link
Copy Markdown
Member

Why

Universal Mocker (keploy mock), Keploy's service virtualization for the tests a team already has, had no place of its own. Its pages sat in the Integration Testing list, and neither the Products menu nor the docs home named it.

What changed

  • Products menu: "Universal Mocker (Service Virtualization)" sits beside Integration Testing and API Testing (AI). It opens the new overview.
  • Sidebar: a Universal Mocker category right after API Testing, with its own icon. Its label opens the overview, with Quickstarts and Guides under it.
  • Docs home: Universal Mocker joins the "How do you want to get started?" entry points, as a card across both columns below the two existing ones. The page's JSON-LD list of entry points is built from the same data, so it lists Universal Mocker too.
  • Overview page (/universal-mocker/overview/):
    • how record and replay work, with a diagram;
    • when to pick it over Integration Testing or API Testing;
    • what sharing through Keploy Cloud needs: a Keploy app in keploy.yml, and a branch other than main;
    • the platforms (Linux, macOS on Apple silicon and Docker; Windows is coming), and the dependencies Keploy 3.9.3 reads on Linux and macOS, taken from the parsers it registers on each OS.
  • Go quickstart (/universal-mocker/quickstarts/go/): a copy-paste Go package whose tests read PostgreSQL and call an HTTP API, on Linux.
    • It records the calls, replays them with both dependencies off, and shows the miss a new test makes.
    • Then it checks each test on its own with KEPLOY_PROVEN=1 and keploytest, and shows what to commit.
    • Every output on the page is from a real run of Keploy 3.9.3 on Linux, trimmed.
  • Moved pages: the mock quickstart and Mock your tests move into the section, and the VS Code extension page is listed there instead of in Integration Testing; its URL is unchanged. Mock Registry stays in Integration Testing: it covers how keploy test uploads mocks.
    • Each old URL redirects to its new one (plugin-client-redirects).
    • Links across the 4.0.0 docs point at the new URLs, the installation pages' included.
    • Both moved pages now say that macOS reads PostgreSQL, DynamoDB and Aerospike calls too, and that native Windows support is coming. The Python walkthrough records and replays with --local, which needs no sign-in, and says its output is from an earlier release while it is updated for Keploy 3.9.3.
  • Checks:
    • onBrokenAnchors: "throw": a link to a heading that doesn't exist fails the build, as a broken link already does. The site builds with none today.
    • scripts/verify-moved-urls.js (yarn verify-moved-urls, a new step in "Deploy PR Build and Check"): each moved URL must hold a redirect to its new URL, and a real page must be there. Add an entry when a page moves.
    • SidebarCategoryIcon.js is reformatted by prettier 2.8.8, which CI runs on every changed file.

How it was checked

  • yarn build (Docusaurus, onBrokenLinks and onBrokenAnchors: throw) and every verify script, the new one included, on Node 22, as CI builds it.
  • The built docs home has the Universal Mocker card and its JSON-LD entry, and /keploy-cloud/mock-registry/ is still a page.
  • prettier@2.8.8 --check on every changed .js and .md file, as CI runs it.
  • A broken anchor fails the build, and a dropped redirect fails verify-moved-urls. Each check in the script was also broken on purpose, and a case caught it.
  • The Go quickstart, run end to end as written by a non-root user with sudo: Keploy 3.9.3 from the public installer, Go, and PostgreSQL 16 in Docker, on Linux. Each block was copied from the page, and each output matches what the page shows, timings aside.

Universal Mocker (keploy mock) had no place of its own: its pages sat in
the Integration Testing list, and the Products menu named only
Integration Testing, API Testing and UI Testing.

- The Products menu lists "Universal Mocker (Service Virtualization)".
- The sidebar has a Universal Mocker category right after API Testing,
  opening on a new overview page: how record and replay work, when to
  pick it over Integration Testing or API Testing, and the platforms and
  dependencies Keploy 3.9.3 supports, from the parsers it registers on
  each OS.
- The mock quickstart, Mock your tests and Mock Registry pages move into
  the section, and the VS Code extension page is listed there. Each old
  URL redirects to its new one, and links across the docs point at the
  new URLs.

Signed-off-by: slayerjain <shubhamkjain@outlook.com>
A copy-paste Go package whose tests read PostgreSQL and call an HTTP
rates API. It records the calls with keploy mock record --local, replays
them with both dependencies off, shows the miss a new test makes, and
then checks each test on its own with KEPLOY_PROVEN=1 and keploytest.
Every output is from a real run of Keploy 3.9.3 on Linux.

Also:
- a Universal Mocker card on the docs home and an icon for its sidebar
  category (SidebarCategoryIcon.js is reformatted by prettier 2.8.8,
  which CI runs on every changed file);
- the installation pages link Mock your tests at its new URL.

Signed-off-by: slayerjain <shubhamkjain@outlook.com>
- Docs home: Universal Mocker joins the "How do you want to get
  started?" entry points (GetStartedPaths), as a card across both
  columns, and the page's JSON-LD list built from the same data. The
  Products card added earlier is dropped: the home does not render it.
- Mock Registry stays in Integration Testing, at its old URL: it
  documents how `keploy test` uploads mocks, not `keploy mock`.
- Overview: Windows is coming, not supported yet. Sharing through
  Keploy Cloud needs a Keploy app in keploy.yml and a branch other
  than main.
- Go quickstart: Linux only until it has run on macOS. Step 1 runs
  git init, Step 2 waits for PostgreSQL, Step 3 lists the four files
  Keploy writes, Step 6 says -json adds a line per test event, and
  Step 7 shows what git status prints.
- Moved pages: macOS reads PostgreSQL, DynamoDB and Aerospike calls
  too; Windows is coming; the Python walkthrough records with --local.
- Checks: a broken anchor now fails the build, and
  scripts/verify-moved-urls.js (yarn verify-moved-urls, run in CI)
  fails when a moved URL stops redirecting to its page.

Signed-off-by: slayerjain <shubhamkjain@outlook.com>
- Mock quickstart: its pasted output is from an earlier Keploy release.
  The page and its description (which llms.txt repeats) now say so, and
  that the page is being updated for Keploy 3.9.3, instead of calling
  the output real and the page copy-paste.
- Go quickstart, Step 7: the other files in keploy/default/, such as
  last-replay.yaml, are this machine's run files, and keploy/.gitignore
  keeps them out of git.

Signed-off-by: slayerjain <shubhamkjain@outlook.com>
@slayerjain
slayerjain merged commit 206f429 into main Nov 19, 2026
6 checks passed
@slayerjain
slayerjain deleted the docs/universal-mocker-next branch November 19, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant