What if API testing worked like Terraform? (An experiment in Go)
Description and use
An experiment applying Terraform-like plan-first workflow to API testing: scenarios are written in TypeScript, compiled into a static plan, and executed in Go, improving test inspection and maintenance.
Problem
API test suites are hard to inspect, audit, and maintain due to ad-hoc code and lack of a declarative plan.
Outcome
Introduces a plan-first approach to API testing that improves test suite inspection, auditability, and maintainability.
Workflow
- Define API test scenarios in TypeScript.
- Run
budment planto generate and inspect a static execution plan without network calls. - Compile the plan into a Go executable AST.
- Execute the compiled plan natively in Go to run the tests.
- Review and iterate on the plan as needed.
Evidence
I built a small project. You define workflows in TypeScript, run budment plan to inspect the execution hierarchy and hooks without making network requests, then execute the compiled AST natively in Go.
- Record date: 2026-09-20T01:45:37.353Z