Skip to content

goga-tool-pybuggy

pybuggy is a goga(https://github.com/qarium/goga) tool for testing: API — it turns OpenAPI/Swagger specifications into ready-made pytest fixtures — HTTP client, endpoint fixtures, response schemas, per-endpoint meta.json input contracts (query parameters, request body, URL variables) — and wires everything into the consumer's test suite. The package contains a pytest plugin and a CLI.

What you get

  • CLI goga tool pybuggy — initialize the environment (goga tool pybuggy init), pull specs from git (goga tool pybuggy endpoint pull), inspect endpoints (list, info), scaffold fixtures (goga tool pybuggy endpoint generate — response schemas, a per-endpoint meta.json input contract, and api.py fixtures) and report drift between the specs and those artifacts (goga tool pybuggy endpoint diff — read-only, one JSON document per endpoint, {} when they match).
  • pytest plugin — a function-scoped api fixture (an HTTP client built from configuration), automatic recursive loading of the generated endpoint fixtures, CLI options for the test run, and flaky-rerun wiring.
  • Assert layerExpect (response-level dispatcher) and AssertField (field-level asserts) on top of the matchcrest matcher library.
  • API-test lifecycle — staged goga pipelines that automate the suite end to end: api.automate (requirements → testcases → test cells → design → plan → acceptance) creates the tests, api.fix repairs them when they break.

Quickstart

Three commands in the target project root:

goga install pybuggy              # 1. install pybuggy into the goga environment
goga tool pybuggy init            # 2. bootstrap: goga project + tool config + conftest.py
goga pipeline pybuggy:api.automate   # 3. run the automated API-test lifecycle

The pipeline asks for the topic under test and drives the whole chain — requirements, test cases, test code — until accepted test_*.py suites land in tests/ (see Pipelines). The CLI and the manual workflow remain available for fine-grained control: CLI Reference.

Where to go next