Tests as data: ensuring AI-generated code does what we want Martin Fowler Martin Fowler martin@martinfowler.com https://martinfowler.c… 11月11日 martinfowler.com Contents Introduction Problems with AI-generated code Problems with AI-generated tests Problems with AI-generated specs What I am proposing Core techniques Customer tests Focus on what matters Not all tests can fit in tables Building on existing traditions Fit and specification by example Testing practices in Go Approval testing Approved Scenarios and Approved Logs Implementation hints Not always end-to-end Customer tests for the UI Dealing with external systems Protecting the test harness Validating the tests Beyond example-based tests Limits of applicability Conclusion Sidebars Test tables over one-off scenarios Tables save the day Internal resources and side channels Isn't this just Gherkin and Cucumber? Internal DSLs