Quick start

1. Install

On macOS or Linux:

curl -fsSL https://www.zyvra.dev/install.sh | sh

On Windows (PowerShell):

irm https://www.zyvra.dev/install.ps1 | iex

This installs for your user only, with no sudo or administrator rights. The download page has the same commands and the archives for downloading by hand. If zyvra is not found afterwards, the installer prints the line to add to your PATH.

2. Create a project

In an empty folder:

zyvra init my-project
zyvra up

Your browser opens the dashboard at http://127.0.0.1:7777. Press Ctrl+C in the terminal, or run zyvra down, to stop.

3. Mock an endpoint

  1. Open Mock Services and choose Create service. A service listens on its own local port.
  2. Add an endpoint: pick a method and a path, then give it a response (status and body). That response is a scenario; add more to switch the endpoint between, say, a normal answer and an error.
  3. Optionally add Rules to answer differently depending on the request, or Faults to make it slow or flaky on purpose.

4. Call it

Open the API Client, send a request to your service’s address, and look at the response. It shows which mock and scenario answered, with a link to the matching entry in Traffic. Every endpoint also has a Try it button that opens the API Client with that request ready.

5. Keep and check your requests

  • Save a request into a collection, so it is kept in zyvra.collections.yaml.
  • On a request, open Tests to add assertions (status, headers, JSON paths, JSON Schema) or to save a value into a variable for the next request.
  • Run the whole collection from the Test Runner.

6. Run it in CI

zyvra run "My collection" --junit report.xml

The exit code says whether everything passed, and the JUnit report plugs into most CI systems. Add --with-mocks to start the project’s mock services for the run, and --data users.csv to run the collection once per row of a data file. Use ZYVRA_SECRET_<NAME> environment variables for secrets in CI.

Already have requests somewhere else?

zyvra import postman my-collection.json
zyvra import openapi openapi.yaml

Postman collections and environments import with their credentials moved into the encrypted store. An OpenAPI spec becomes a collection with a folder per tag, shared auth and optional checks.