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