reoclo tests
reoclo tests ls [options]reoclo tests enable [options]reoclo tests disable [options]reoclo tests init [options] <name>reoclo tests validate [paths...]reoclo tests run [options] <name>reoclo tests runs [options]reoclo tests show <run>reoclo tests logs [options] <run>reoclo tests cancel <run>reoclo tests rerun <run>reoclo tests works with the test files in a repository’s ci/reoclo/tests/ folder and with the runs they produce on test servers. Pools are managed with reoclo test-pools. Available from CLI 0.105.0.
Test servers are enabled for your organization by Reoclo. Until then these commands answer with not found.
Choosing the repository
Section titled “Choosing the repository”--repo <repo> takes the linked repository as owner/name or as its id. When you leave it out, the command reads the origin remote of the checkout you are in. A repository that Reoclo does not mirror yet exits with code 5 and tells you to run reoclo repos link.
<run> is a run’s id or its number, as in 12 or #12. Run numbers are unique in your organization.
Lists the test files on the repository’s default branch with their pool, triggers, job count and validation result.
--repo <repo>is the repository.--refreshre-reads the files from the default branch first.
$ reoclo tests ls --repo acme/web --refreshNAME POOL TRIGGERS JOBS COMMIT STATUSunit ci manual, push main 2 abcdef1 validWhen tests are off for the repository, ls says so on stderr and names the command that turns them on.
enable and disable
Section titled “enable and disable”enable allows test runs from a repository. It needs the organization admin role.
A test file runs the commands it contains, so anyone who can push to the repository can run commands on machines in your cloud account. enable prints that warning and asks before it changes anything. --yes skips the question. Reoclo records who enabled tests and when. disable stops new runs and asks nothing.
$ reoclo tests enable --repo acme/webAnyone who can push to acme/web will be able to run commands on machines in your cloud account. Reoclo records who enabled this.enable tests for acme/web? [y/N]: y✓ tests enabled for acme/webWrites a starter test file to ci/reoclo/tests/<name>.yml at the root of the current repository. The starter has one job with a step that lists the checkout and a placeholder test step. It runs on a manual start and on pushes to the default branch.
--pool <slug>is the test pool that runs it. Defaultdefault, so set it to one of your pool slugs.--image <image>is the container image the steps run in. Defaultalpine:3.--forceoverwrites an existing file. Without it,initexits with code 1.
init only writes a file, so it needs no sign-in.
$ reoclo tests init unit --pool ci✓ wrote ci/reoclo/tests/unit.ymlvalidate
Section titled “validate”Checks test files with the API, without running anything. With no paths it checks every ci/reoclo/tests/*.yml in the current repository. Paths can be files or folders. The command exits with code 1 when any file is invalid or when it finds no files.
A valid file can still carry warnings, printed under it with !: a pool the file names that does not exist, or a pool without the storage bucket a job’s cache or artifacts need. --repo <repo> also checks that the repository has tests enabled. Warnings do not change the exit code. They need CLI 0.113.0 or later.
$ reoclo tests validate --repo acme/web✓ ci/reoclo/tests/unit.yml: valid (pool ci, 2 jobs, 3 steps, on manual and push main) ! Job 'unit' uses a cache or artifacts, but test pool 'ci' has no storage bucket. Add a bucket to the pool first✗ ci/reoclo/tests/load.yml: invalid: Job 'load' needs unknown job 'smoke'With -o json it prints one object per file with path, name, valid, error, warnings and a test summary. See Test files for every key and limit.
Starts a run of a test file. Tests must be enabled for the repository, and the file must allow manual runs (on.manual).
--repo <repo>is the repository.--ref <branch>is the branch to test. Default: the repository’s default branch.--sha <sha>is the commit to test. Default: the head of the branch.--input <KEY=VALUE>gives an input a value. Repeat the flag for each input. Available from CLI 0.106.0.--waitfollows the run until it ends.
$ reoclo tests run unit --repo acme/web --ref main✓ run #12 started: unit at abcdef1 (main), id: 01a1cf2f-3b3b-7982-a12e-e73d001bee64Inputs
Section titled “Inputs”When the test file declares inputs, pass each value with --input. The key is the input’s name and everything after the first = is the value, so a value can contain =.
$ reoclo tests run room-load --repo acme/web --input room_link=https://rooms.example.com/r/4821 --input users=500✓ run #14 started: room-load at abcdef1 (main), id: 01a1cf31-2c3d-7e4f-9a5b-6c7d8e9f0a1bReoclo checks the values against the file at the commit being tested. A key the file does not declare, or a required input with no value and no default, is refused with a message that names it, and the CLI exits with code 1. Inputs with a default can be left out. Passing the same key twice is an error.
The value of a secret input never appears in the CLI’s output, but it does appear in your shell history when you type it. In CI, pass it from a secret variable, as in --input api_token="$API_TOKEN".
Waiting for the result
Section titled “Waiting for the result”With --wait, run prints each job and step as it changes and the job logs as they arrive, then exits with a code that reports the outcome:
| Exit code | The run |
|---|---|
0 | passed |
1 | failed |
2 | errored or was cancelled |
130 | is still going, because you pressed Ctrl+C and chose not to cancel it |
$ reoclo tests run unit --repo acme/web --waitrun #12 started: unit at abcdef1 (main)run #12 queuedjob check: pendingrun #12 runningjob check: waitingjob check: provisioningjob check: runningstep 1 First echocli check step onestep 2 Second echocli check step twostep 1 First echo: passedstep 2 Second echo: passedjob check: passed (exit 0)run #12 passedrun #12 passed in 2m37sA run with several jobs prefixes each line with the job key, as in [unit] ok. With -o json, progress goes to stderr and the final run, with its jobs, goes to stdout.
Ctrl+C while waiting asks whether to cancel the run. Answer y to cancel it and wait for it to stop. Answer anything else to stop waiting and leave the run going. Without a terminal the CLI never prompts and stops waiting at once.
Lists test runs, newest first.
--repo <repo>shows only the runs of this repository. Without it,runslists every repository.--test <name>shows only the runs of one test.--state <state>shows only runs in one state:queued,running,passed,failed,cancelling,cancelledorerrored.--limit <n>is how many runs to list. Default 20, the most is 200.
$ reoclo tests runs --test unit --state failedRUN TEST STATE REF COMMIT TRIGGER CREATED DURATION ID9 unit failed main c0ffee1 manual 2026-11-11T09:12:44Z 1m18s 01a1cc72-1127-7311-8c2f-74cbc0b3ce51Shows one run with its commit, trigger, state and duration, then its jobs with their state, passed steps, exit code and dependencies. An error that ended the run is shown too.
$ reoclo tests show 12run #12id 01a1cf2f-3b3b-7982-a12e-e73d001bee64test unitstate passedref maincommit abcdef1trigger manualcreated 2026-11-12T09:55:41.266000Zduration 2m37s
JOB STATE STEPS PASSED EXIT DURATION NEEDSsmoke passed 2/2 0 4safter passed 1/1 0 4s smokePrints the output of a run’s jobs. Reoclo keeps test logs for 30 days.
--job <key>prints one job. It takes the job’s key from the test file.--followkeeps printing until the run ends, polling every 2 seconds. Use it to watch a run someone else started.
A run with several jobs prefixes each line with the job key.
$ reoclo tests logs 12 --job smoke --followcancel and rerun
Section titled “cancel and rerun”cancel stops a queued or running run, cancels its remaining jobs and deletes their machines. A run that already finished answers with an error.
rerun starts a new run of the same test at the same commit and prints the new run.
$ reoclo tests cancel 12✓ cancel requested: run #12 (cancelling)$ reoclo tests rerun 12✓ run #13 started: unit at abcdef1 (main), id: 01a1cf30-1b2c-7d3e-8f4a-5b6c7d8e9f0aUse it in CI
Section titled “Use it in CI”Authenticate with a machine user token. An automation key cannot call these commands; see CI and automation for the credential types. Set the token as REOCLO_MACHINE_TOKEN and let the exit code decide the pipeline step.
- name: Run tests on Reoclo run: reoclo tests run unit --repo acme/web --ref "$GITHUB_REF_NAME" --sha "$GITHUB_SHA" --wait env: REOCLO_MACHINE_TOKEN: ${{ secrets.REOCLO_MACHINE_TOKEN }}steps: - name: reoclo-tests image: debian:bookworm-slim environment: REOCLO_MACHINE_TOKEN: from_secret: reoclo_machine_token commands: - apt-get update && apt-get install -y --no-install-recommends curl ca-certificates - curl -sSL https://get.reoclo.com/cli | bash - reoclo tests run unit --repo acme/web --ref "$CI_COMMIT_BRANCH" --sha "$CI_COMMIT_SHA" --waitRelated
Section titled “Related”reoclo test-pools: create and manage the pools that run your tests- Test servers: how runs, pools, budgets and commit statuses work
- Test files: every key in a test file
- Test examples: copy-paste test files