Skip to main content

Module brew

Module brew 

Source
Expand description

Brew (Homebrew CLI) e2e test generator.

Generates a self-contained shell-script test suite that tests a CLI binary installed via Homebrew. The suite consists of:

  • run_tests.sh — main runner that sources per-category files, tracks pass/fail counts and exits 1 on any failure.
  • test_{category}.sh — one file per fixture category, each containing a test_{fixture_id}() shell function.

Each test function:

  1. Constructs a CLI invocation: {binary} {subcommand} "{url}" {flags...}
  2. Captures stdout into a variable.
  3. Uses jq to extract fields and runs helper assertion functions.

Requirements at runtime: bash, jq, and MOCK_SERVER_URL env var.

Structs§

BrewCodegen
Brew (Homebrew CLI) e2e code generator.