A change to an API can break something nobody was looking at: a login that now answers 500, a field a page needed, a price that comes back as text. A regression test is a request you send again after every change, with a test that says what the answer should be. CI (continuous integration) is the service next to your code — GitHub Actions, GitLab CI — that runs such checks by itself on every push and pull request, so the break shows before it is merged.
Your collection already holds the requests and the tests. Run in CI… writes the file that makes GitHub or GitLab run them, with the DialCatz CLI. The app is not needed there.
Tests first
Without tests, any answer passes, even an error 500. A request fails in CI when it gets no answer, when one of its tests fails, when a script throws, when a
{{variable}}has no value, or when its response does not match the spec the run checks against. A 500 is an answer.
The dialog says how many of the collection’s requests have no test. One test in the collection’s Settings… covers every request in it:
dc.test('not a server error', () => dc.expect(dc.response.status).toBeLessThan(500));
Make the workflow
Right-click a collection → Run in CI…, and choose GitHub Actions or GitLab CI. Setup has the choices, Preview shows the file exactly as it will be written, with Copy. Nothing is written until you save.
When
| Choice | What it does |
|---|---|
| On pushes to | Pushes to this branch (main at first) |
| On pull requests / On merge requests | Every pull request on GitHub, merge request on GitLab |
| On a schedule | Five cron fields, in UTC — 0 3 * * 1-5 is 03:00 on weekdays. On GitLab the schedule itself is set on the site, under Build → Pipeline schedules; the file says which cron to enter |
A run can also be started by hand on both.
Variables
DialCatz lists the {{variables}} the collection uses, leaving out {{$dynamic}} ones and those its scripts set:
| Kind | What goes into the file |
|---|---|
| Secret | A reference to GitHub’s or GitLab’s own store, never the value. clientSecret becomes CLIENT_SECRET there; after saving, the dialog lists the names to add, each with a copy button |
| Plain | The value itself, for everyone who can see the repository |
A variable marked secret, or named like one (token, key, password …), starts as Secret. The others start as Plain, with the value from the collection’s environment filled in: look at them before you save, or choose Secret instead.
Where the secrets go:
- GitHub — the repository’s Settings → Secrets and variables → Actions
- GitLab — the project’s Settings → CI/CD → Variables, as masked
Pull requests from forks get no secrets on GitHub. That protects them: anyone can open such a pull request. So requests that need a secret cannot pass there. Run the full set on pushes to your own branches.
Before the tests
Shell commands that start your API, for example docker compose up -d --wait. Leave it empty when the API already
runs somewhere CI can reach.
The rest
| Choice | What it does |
|---|---|
| Try a failed request again | Up to 10 times, for an API that needs a moment |
| Keep an HTML report with each run | One file you download from the run and open in a browser |
| Use the DialCatz action | GitHub only: a shorter workflow with the DialCatz action. Off, the workflow calls the CLI through npx, with nothing between |
When the collection follows a spec file that is in the same repository, the run also checks every response against it.
Save it
| Your workspace | What Save does |
|---|---|
| A folder workspace | Writes the file into the Git repository the folder is in. Not in one yet? Open Git takes you there |
| Any other | Save to a project… asks for a folder in a Git repository, and writes the collection there too, as api-tests/<name>.dialcatz_collection.json. That file is a copy: save again after you change the collection |
| File | For |
|---|---|
.github/workflows/dialcatz-<collection-name>.yml |
GitHub Actions: a workflow called API tests: <collection> |
.gitlab/dialcatz-<collection-name>.gitlab-ci.yml |
GitLab CI: a job called dialcatz-<collection-name> |
Each collection has its own workflow, so a repository can run as many as you like. The collection Cat shop becomes
dialcatz-cat-shop.yml; a name without Latin letters or digits uses the collection’s id. Two collections whose names
make the same file name ask before one replaces the other.
- An existing
.gitlab-ci.ymlis never edited. DialCatz shows the line to add to it, under theincludeit has, if any. That goes for a second collection too:
With noinclude: - local: .gitlab/dialcatz-cat-shop.gitlab-ci.yml.gitlab-ci.ymlyet, it makes one with that line. - Files that are already there are replaced only after you press Replace, and a workflow DialCatz did not make is never replaced.
- Credentials written out in a request — a token in a header instead of
{{token}}— would go into the repository with the collection. The dialog names those requests and holds Save to a project… until you move them into variables, or tick to save anyway. In a folder workspace the requests are in the repository’s files already.
DialCatz commits and pushes nothing here. Commit the files and push them to start the first run.
Reading a run
On GitHub the run’s page gets a summary — what failed, with the status and the reason, and every request under it —
and an error for each failed request (the first ten). On GitLab the job hands GitLab a JUnit report, which it shows
in the merge request and the pipeline’s Tests tab. With Keep an HTML report, the report is in the run’s
artifacts on both: on GitHub the artifact is dialcatz-<collection-name>-report, and the file in it
dialcatz-report.html.
What the reports hide, and what they cannot, is on the CLI page. The result shows on GitHub or GitLab: DialCatz itself does not show CI runs.
The DialCatz action
catzoidhub/DialCatz-Action is the same run as one step of a GitHub workflow, also for Postman collections and OpenAPI files:
name: API tests
on: [push, pull_request]
permissions:
contents: read
jobs:
api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: docker compose up -d --wait # start your API, if it is not running somewhere already
- uses: catzoidhub/DialCatz-Action@v1
with:
path: ./api
report: dialcatz-report.html
env:
baseUrl: http://localhost:3000
apiToken: ${{ secrets.API_TOKEN }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: dialcatz-report
path: dialcatz-report.html
if-no-files-found: ignore
| Input | What it does |
|---|---|
path |
Required. A workspace folder, a DialCatz or Postman collection file, or an OpenAPI file |
collection |
Only this collection of a workspace folder |
folder |
Only the requests under this folder |
vars |
Variables, one name=value per line |
env-file |
A file of NAME=value lines |
data |
A CSV or JSON file; the collection runs once per row |
spec |
An OpenAPI file every response is checked against |
retries |
Try a failed request again, up to this many times |
bail |
true: stop at the first failure |
report |
Where to write an HTML report |
details |
true: headers and bodies in the HTML report, credentials hidden |
junit |
Where to write a JUnit XML report |
args |
More options of dialcatz run, one per line (--timeout=60) |
working-directory |
Where to run (.) |
version |
The dialcatz version on npm (1: the latest 1.x) |
Its outputs are passed, requests and failed. It needs Node.js 20 or later and says so when the runner has an
older one.
The action is MIT; the CLI it runs stays GPL-3.0. Running them does not affect your own code’s licence.
With MCatzP
An AI assistant can prepare it through MCatzP: ci_plan reads what a workflow needs — the
variables and their kind, never a value, how many requests have tests, and credentials written out — and
save_ci_workflow writes it, after asking in DialCatz. A secret never takes a value there, and nothing is committed or
pushed.
Limits
- GitHub Actions and GitLab CI. For another service, run the CLI yourself.
- The workflow runs on Linux runners and stops after 20 minutes.
- The CLI reads nothing from the app: no environment values, kept tokens or client certificates.
- Authorization code and device code sign-ins need a person; use client credentials in CI.
Last updated 2026-11-25