API Testing API Design-First Testing Workflow: Spec → Mock → Implement → Test Most teams write code first, then document it. The API exists; you write the OpenAPI spec to describe what you built.