Skip to Content
Docs
Capture

Command capture

Record a failing test, build, or script with its original source and output.

Prepare your project

Sign in and select an organization. Install the project's dependencies and confirm the failure locally. Run capture from the application's directory. In a monorepo, start in the app package so dependency selection can identify it.

Run the capture

From your application's directory, replace the test command with the one that fails:

reprolane capture command "npm test" \
  --title "Checkout test fails" \
  --expected "The checkout test passes" \
  --actual "The checkout test throws an error"

Quote the whole command so your shell passes it as one argument. Reprolane freezes the source before execution and collects output and failure details. Review the selected files, sanitized evidence, and destination before approving upload.

Expect a reproduction URL on success. Open it to compare the captured output with your local failure. If the command succeeds, capture normally refuses to treat it as a failure. Use --allow-success only when deliberately capturing a successful run.

Prepare for a fresh replay

If the replay needs dependency installation or generated inputs, record that setup at capture time. From the same app directory, for a Node project with a generate script:

reprolane capture command "npm test" \
  --setup-install \
  --prepare "npm run generate"

These options describe verification setup. They do not install dependencies for local capture. Install lifecycle scripts are disabled unless explicitly allowed with --allow-lifecycle-scripts. Enable them only for a project whose install behavior you trust.

Automation

From the app directory, use a reviewed policy and provide REPROLANE_API_KEY through your secret environment:

reprolane capture command "npm test" \
  --organization YOUR_ORGANIZATION_ID \
  --capture-policy .reprolane/capture-policy.json \
  --consent-upload --json

Expect a JSON receipt with id, hash, url, signature, and privacy details. Progress uses standard error. CLI exit 0 means the operation succeeded even if the captured command failed. Exit 1 indicates an operation failure, 2 invalid arguments or a privacy failure, and 130 cancellation.

If upload or setup fails, use troubleshooting. Request clean verification separately in the app.

On this page