Skip to main content

18 docs tagged with "mocks"​

View all tags

Branches and pull requests​

How Universal Mocker recordings follow git. Each commit's keploy.lock pins what its replay serves, a branch's lock is listed under a Keploy branch of the same name, a pull request shows the tests it re-records, and merging the pull request in git merges its recordings. Every output is from Keploy 3.9.4.

Declare in keploy.yml what your app does on its own​

How the mock.rules of keploy.yml name the calls your app makes after a test or on its own timer, the times it reads from its clock and the ids it mints, what keploy mock record and keploy mock replay do with each rule with KEPLOY_PROVEN=1, what keploy refuses, and the lines the rules leave. Read from the Keploy 3.9.10 code.

IDE integrations — VS Code​

Keploy's VS Code extension installs the Keploy CLI, signs you in, and hands the setup of Keploy's dependency mocks to your coding agent.

Keploy VS Code extension​

Install the Keploy VS Code extension, sign in, and hand the setup of Keploy's dependency mocks to your coding agent. Where the CLI goes, which platforms work, what goes out, settings, telemetry and troubleshooting.

keploy.yml and keploy.lock​

What keploy.yml and keploy.lock hold for the Universal Mocker, which files to commit, how keploy.lock pins your recordings, and how to publish a recording that a record kept in its staging folder.

Mock Your Own Tests (pytest, go test, jest)​

Use Keploy as a language-agnostic mocking and service virtualization tool for your existing test suite — record the real dependency calls your tests make, then replay them so the suite runs without the real dependencies.

Network isolation in replay​

What keploy mock replay sends to the real network and what it keeps from it, how to let a call out on purpose with --on-miss passthrough, --pass-through-ports and --allow-egress dns, how to tell whether a replay reached a real service, and what a replay doesn't intercept. Every output is from Keploy 3.9.4.

Notes for each dependency​

How the Universal Mocker tells your databases, queues and services apart, how it reads encrypted connections, and what to know about PostgreSQL, MySQL, Redis and Amazon SQS when you record and replay your tests with keploy mock. Read from the Keploy 3.9.4 code.

Re-record only the tests that changed​

Record a new test, or re-record a test whose calls changed, without running the whole suite against the real dependencies again. keploy.lock keeps every other test's recording. Replay a few tests, and see what a branch re-records with keploy mock diff. Every output is from Keploy 3.9.4.

Run the replay in CI​

Replay your tests on every pull request and every push to main with no database or service running. The GitHub Actions workflow, the read-only CI key, caching the recordings, the pull request comment, what fails the job, other CI systems and re-recording. Every output is from Keploy 3.9.4.

Start-up calls and background work​

Where the Universal Mocker records the calls your app makes outside a test, such as at start-up, for a cached token or from a poller, which test a replay answers each one in, and how sessionCalls serves a call to every test. Read from the Keploy 3.9.4 code.

Times, dates and ids that change​

What keploy mock replay does when your tests send values that change on every run, such as the time, today's date, random ids in a header, a body or a path, and a token that expires, in a replay of the whole run and in a replay that checks each test on its own. Every output is from Keploy 3.9.4.

Troubleshoot the Universal Mocker​

What keploy mock record and keploy mock replay print when something goes wrong, what causes it, and how to fix it, from a call with no recording to a replay that passes on your machine but fails in CI. Every message is from Keploy 3.9.4.

Universal Mocker features​

Every capability of Keploy's Universal Mocker (keploy mock), each with a link to the page that shows it. Record and replay any test command, check each test on its own, share recordings through keploy.lock and Keploy branches, re-record one test, keep replays off the real network, and handle values that change.

Universal Mocker reference​

Every keploy mock command and flag of Keploy 3.9.13, as the CLI's own help prints it, the keploy.yml keys and environment variables that set the same values, the exit codes, and the replay results keploy mock status reports.

Use the Universal Mocker with a coding agent​

Install Keploy's mocking skill for Claude Code, Cursor, Codex, GitHub Copilot or Antigravity, then let your agent record and replay your tests' dependency calls by following the NEXT block each keploy mock command prints. Every output is from Keploy 3.9.4.