feat(tests): add Python test framework with full schema coverage
Adds a Rosetta-inspired, read-only test suite at tests/ for any GraphQL
implementation of the cardano-graphql schema. Six phases shipped in one go:
Phase 1 — sanity, golden functional, negative tests
Phase 2 — Locust load harness + p95<500ms / err<1% baseline gate
Phase 3 — multi-instance comparison (skipped without --compare-url)
Phase 4 — regression goldens seeded from cardano-foundation issues
(#951, #953, #978/#980, #979)
Phase 5 — schema introspection diff against committed snapshot
Phase 6 — CI workflows: PR gate, nightly, weekly
Coverage:
* 52 / 52 top-level Query roots (100%)
* 428 / 440 data-type fields (97.3%) across 61/61 types touched
* 59 mainnet goldens captured at anchor block 13228000
* 8 preprod goldens scaffolded (auto-skip on mainnet runs)
* 8 negative tests, 7 schema tests (1 integration + 6 offline unit)
Determinism:
* All goldens pinned to anchor_block 13228000 in config/networks.yaml
* Address buckets: light / medium / heavy with separate goldens + perf tasks
* --update-golden record-then-review lifecycle; forbidden when CI=true
* Volatile fields masked via dot.notation[*] ignore_paths DSL
Tooling:
* uv-managed, Python 3.12+
* generate_report.py: self-contained HTML report with coverage panel,
per-test timing table, and query corpus appendix
* utils/coverage.py: graphql-core-based coverage report (top-level + field)
* utils/markers.py: lists 52 auto-applied root markers + cip26/cip68
* Dynamic markers — pytest -m assets / -m cip26 / -m cip68 / -m <root>
target only goldens whose query touches that root, computed at collection
Reusable patterns lifted from cardano-rosetta-java/tests/data-endpoints:
* pytest_runtest_makereport Allure attachment hook
* Recording GraphQL client proxy
* YAML network test data layout
* Deep-diff with path-based ignores
Documentation:
* tests/README.md — top-level reference
* tests/QUICKSTART.md — install + run in 5 minutes
* tests/TESTING_GUIDE.md — skim-friendly reference for all test types
* tests/CONTRIBUTING.md — how to add tests, refresh anchor, debug
* tests/{performance,multi_instance,schema,negative}/README.md
* tests/queries/{coverage,regression}/README.md
* .claude/skills/test-cardano-graphql.md — natural-language Claude skill
CI:
* .github/workflows/graphql_tests.yml — PR gate (markers=pr), nightly (full
functional + negative + schema), weekly (adds perf smoke + baseline gate),
workflow_dispatch with optional URL override and run_perf toggle.
* Every job exports CI=true to block --update-golden / --update-schema.