DevTools

API Testing in CI/CD Pipelines

Run multi-step API tests on every push with a Go-based CLI that executes flows in parallel, produces JUnit/JSON reports, and returns clean exit codes for your pipeline.

Why run API tests in CI/CD?

Catch API regressions before merge

Running multi-step API tests on every pull request catches breaking changes in auth flows, data validation, and cross-service dependencies before they reach production.

API tests as code

DevTools exports tests as human-readable YAML that lives in your repo alongside the code it tests. Review API test changes in pull requests just like any other code change.

Fast, parallel execution

The DevTools CLI is a Go binary that runs flows in parallel by default — no Node.js runtime, no Docker image pulls, no heavy dependencies. Install and run in seconds.

How it works

1

Build flows in DevTools Studio

Import a HAR, chain requests with auto-mapped variables, and add assertions. Build visually, test locally.

2

Export YAML and commit to Git

Export your multi-step test as clean YAML. Commit it to your repo so it's versioned, reviewable, and portable.

3

Run in CI with the DevTools CLI

Install the CLI in your pipeline, run the YAML file, and get JUnit/JSON reports. Exit code 0 = pass, 1 = fail.

GitHub Actions

.github/workflows/api-tests.yml
name: API Tests
on: [push, pull_request]
jobs:
  api-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install DevTools CLI
        run: curl -fsSL https://sh.dev.tools/install.sh | bash

      - name: Run API tests
        env:
          BASE_URL: ${{ secrets.API_BASE_URL }}
          TEST_EMAIL: ${{ secrets.TEST_EMAIL }}
          TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
        run: devtools flow run --report junit:results.xml tests.yaml

      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: api-test-results
          path: results.xml

See the full template: GitHub Actions template

GitLab CI

.gitlab-ci.yml
api-tests:
  stage: test
  script:
    - curl -fsSL https://sh.dev.tools/install.sh | bash
    - devtools flow run --report junit:results.xml tests.yaml
  artifacts:
    when: always
    reports:
      junit: results.xml

See the full template: GitLab CI template

Any pipeline (Jenkins, CircleCI, etc.)

The DevTools CLI works in any environment that can run a shell command:

Shell
# Install
curl -fsSL https://sh.dev.tools/install.sh | bash

# Run with JUnit output
devtools flow run --report junit:results.xml tests.yaml

# Run with JSON output
devtools flow run --report json:results.json tests.yaml

# Exit code: 0 = all pass, 1 = any failure

Reports and exit codes

JUnit XML

Standard JUnit XML format understood by GitHub Actions, GitLab CI, Jenkins, CircleCI, and every major CI platform. Use --report junit:file.xml.

JSON report

Machine-readable JSON with detailed request/response data, timings, and assertion results. Use --report json:file.json.

Clean exit codes

Exit code 0 when all tests pass,1 on any failure. Designed for pipelines that need deterministic pass/fail gates.

Parallel execution

Independent flows run in parallel by default. Override with --sequential when needed. Go-based runner keeps CI runs fast.

Environment secrets

Reference CI secrets in your YAML flows using the {{#env:VAR_NAME}} syntax. No plaintext credentials in your test files:

Environment variable usage
env:
  BASE_URL: '{{#env:BASE_URL}}'

# In steps:
- request:
    name: Login
    method: POST
    url: '{{BASE_URL}}/auth/login'
    body:
      email: '{{#env:TEST_EMAIL}}'
      password: '{{#env:TEST_PASSWORD}}'

Set these as CI secrets (GitHub Actions secrets, GitLab CI variables, etc.) and the CLI reads them at runtime.

FAQ

Do I need Docker to run API tests in CI?

No. The DevTools CLI is a single Go binary. Install with one curl command — no Docker, no Node.js, no heavy runtime needed.

How fast is the CLI compared to Newman?

The Go-based CLI runs flows in parallel by default and has no runtime overhead. It installs in seconds and executes multi-step tests significantly faster than Node.js-based runners.

Can I run different test suites for different branches?

Yes. Since tests are YAML files in your repo, different branches can have different test files. Use environment variables to point at staging vs production URLs.

Does it support test reporting in pull requests?

Yes. JUnit XML output integrates with GitHub Actions test summaries, GitLab merge request test reports, and Jenkins test result visualization out of the box.

Start running API tests in CI

Install the DevTools CLI and add multi-step API tests to your pipeline in minutes.