本讲通过 GiftGenius 构建 ChatGPT App 的“最小可行”测试金字塔:针对纯函数(
scoreGift、
rankGifts)的快速
unit 测试,面向 MCP 工具(
inputSchema/
outputSchema)与 ACP/webhooks 的 contract 测试,不依赖
chatgpt.com 的“近似 E2E”(React Testing Library + Playwright),以及在 CI 中的 smoke 检查,用来确保:
Next.js 能启动、MCP 能响应基础调用、checkout 端点在典型 JSON 上不会崩溃。