What if API testing worked like Terraform? (An experiment in Go)
Описание и применение
Эксперимент по применению подхода Terraform к тестированию API: сценарии пишутся на TypeScript, компилируются в статический план, а затем исполняются в Go, что упрощает аудит и поддержку тестов.
Задача
API test suites are hard to inspect, audit, and maintain due to ad-hoc code and lack of a declarative plan.
Результат
Introduces a plan-first approach to API testing that improves test suite inspection, auditability, and maintainability.
Рабочий процесс
- 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.
Доказательства
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.
- Дата записи: 2026-09-20T01:45:37.353Z