Skip to content

v0.18.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 13:38
· 69 commits to main since this release

Cookies, Basic and OAuth2, tables of cases, shared steps, named imports, and run to here.

Highlights

Cookies

Every workflow run keeps the cookies the server sets, redirects included, and sends them with the next requests. Each workflow starts with none; tinyprobe call keeps none between calls. Cookies can be checked, and saved for a CSRF header:

- call: login
  expect:
    cookies:
      sid: { exists: true }
  save:
    csrf: { cookie: XSRF-TOKEN }

The recorded request (ndjson, the VS Code extension) now shows the Cookie header as sent.

Basic auth and OAuth2 client credentials

Two keys of an auth set, next to its headers:

auth:
  admin:
    basic: { username: ${username}, password: ${password} }
  service:
    oauth2:
      token_url: ${authUrl}/oauth/token
      client_id: ${clientId}
      client_secret: ${clientSecret}
      scope: [orders:read]
  • tinyprobe computes the Basic header.
  • It gets the OAuth2 token on first use and reuses it for the run until it expires, so tinyprobe call works on protected endpoints with only the environment file.

for_each: tables of cases

One step, one call per item. Each item's keys are arguments, and in a for_each step the expected status can come from the item. The list is written in the workflow, held by a variable, or read from a CSV or JSON file, which is how Postman data files translate.

- name: Invalid users are rejected
  call: create_user
  for_each:
    - { email: "", error: email_required }
    - { email: not-an-email, error: email_invalid }
  expect:
    status: 422
    body: { $.code: ${error} }

Every item runs, even after a failing one, and the console and JUnit show one line per item.

Sequences: steps shared by several workflows

A login written once, in tinyprobe/sequences/, and run with use. Its params are local to it; what it saves is visible after it.

steps:
  - use: ../sequences/log-in.yaml
    with: { password: "${adminPassword}" }
  - call: list_orders

Named imports

Two services with the same endpoint names can be imported together:

import:
  - ../api/shop.yaml
  - billing: ../api/billing.yaml    # billing.login, billing.create_invoice

Run to here

tinyprobe run tinyprobe/workflows/orders.yaml --to 4 -v

This runs a workflow up to a step, given by its number or its name, and stops. The steps after it are not counted, so the run exits 0 when everything up to it passed. The MCP run tool takes to as well. The VS Code extension's ▶ Run to here follows in its next release.

Also

  • Protocol 1, new keys only:
    • basic_auth, oauth2, for_each, source_location, sequence, import_name, imports, kind: sequence;
    • iterations on step_completed;
    • to and stopped_after on the run events.
  • Guide: tinyprobe guide now translates Postman, Insomnia and Bruno cookies, Basic, OAuth2 client credentials and data files, and the same from OpenAPI, HAR and curl.
  • Size and speed budgets in CI: the binary is 9.2 MB, starts in under 10 ms, and runs 500 requests with their checks in about 300 ms against a local server.
  • tinyprobe init also creates tinyprobe/sequences/.

No breaking changes.

What's Changed

  • Cookies: a jar per workflow, expect.cookies, save from a cookie by @kikutano in #25
  • Basic auth and OAuth2 client credentials in auth sets by @kikutano in #26
  • for_each: repeat a step over a list of items by @kikutano in #27
  • Sequences: steps shared by several workflows, run with use by @kikutano in #28
  • Performance guard in CI: size and speed budgets by @kikutano in #29
  • Named imports: call billing.login by @kikutano in #30
  • run --to: run a workflow up to a step by @kikutano in #31

Full Changelog: v0.17.0...v0.18.0