Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 3 KB

File metadata and controls

39 lines (24 loc) · 3 KB

Reviewer demo script

Short path to prove the full stack end-to-end. Assumes Docker Desktop (or compatible engine) is running and Java 21 is installed.

  1. cp .env.example .env — Creates local env defaults for Compose and tools. Outcome: .env exists with Postgres and Backline-related variables.

  2. ./gradlew clean build (Windows: .\gradlew.bat clean build) — Compiles all modules and runs tests. Outcome: build finishes successfully (or note any failing module before demoing).

  3. docker compose up --build -d — Starts Postgres, API, and worker. Outcome: containers are healthy; API Flyway migrations apply on first start.

  4. ./gradlew :apps:cli:installDist — Produces the backline launcher under apps/cli/build/install/backline/bin/. Outcome: CLI binary exists.

  5. Add CLI to PATH — Unix: export PATH="$PWD/apps/cli/build/install/backline/bin:$PATH". PowerShell: $env:Path = "$PWD\apps\cli\build\install\backline\bin;$env:Path". Outcome: backline resolves in the shell.

  6. backline doctor — Verifies config and API reachability (BACKLINE_API_URL). Outcome: doctor reports API OK when http://localhost:8080 is reachable.

  7. backline sample init — Materializes sample files (skips if already present, depending on CLI flags). Outcome: examples/sample-api/backline.yml exists for editing or reference.

  8. backline sample serve or docker compose --profile demo up -d sample-api — Runs the sample HTTP service on 8081. Outcome: curl http://localhost:8081/health returns JSON with "status":"UP".

  9. cd examples/sample-api && backline run — Submits a run from the canonical config. Outcome: run completes with at least one failed check (broken-endpoint vs intentional 500) and passing checks for health, user fetch, and schema-change (stable observed contract).

  10. backline history — Lists recent runs from the API. Outcome: the new run appears with expected status.

  11. Optional observed-contract drift — Switch the sample schema mode, then run again and diff:

    curl -s -X POST http://localhost:8081/schema-change/mode \
      -H 'Content-Type: application/json' \
      -d '{"mode":"breaking-remove"}'
    backline run
    backline diff <newRunId>

    Outcome: schema-change shows breaking contract drift (removed $.name) without claiming OpenAPI validation. Reset with {"mode":"stable"} when done.

  12. backline diff <runId> — Shows regression diff vs the previous completed run. Outcome: structured diff output including contract sections when applicable (or a clear message when no previous baseline exists).

  13. backline report <runId> — Writes a Markdown report and prints its path. Outcome: report file on disk contains run summary, check summary, failures, latency, diff (with contract drift when present), limitations link, and timestamp.

For raw HTTP debugging of the same data, use api-examples.md.