LogoSu Jiang
  • Blog
  • Knowledge Base
  • About Me
苏江:AI写代码能自动化,那功能测试能否也自动化?
2025/12/01

苏江:AI写代码能自动化,那功能测试能否也自动化?

苏江:AI写代码能自动化,那功能测试能否也自动化?

image

1、AI编程不仅仅是写代码。 从需求分析、再到功能实现、再到功能测试、这是一个最最小的闭环。

2、需求分析,可以用Spec Coding方式来做。确保AI不会乱来。

参考文章:在团队里如何使用AI编程?Spec coding实践

3、有详尽的需求分析,或者产品设计文档后,那再配上最好的AI模型,比如Claude Opus 4.5, 就避免多走弯路,快速实现到位。

减少在“不符合预期<--->重新修改”之间的往复循环。

4、那功能测试呢?我最讨厌功能测试了。尤其是在敏捷开发中,每次改一个小功能,都要把整个流程回归测试一遍(Regression Testing),简直是扼杀创造力。

当产品没有用户时,只有自己在用,以往自己实测十几次,可能仍然有bug,问题很难一次性找全。

而AI自己生成的测试脚本,局限性很大,并不能完全模拟真人用户操作。

5、受之前“AI自动操控浏览器”的启发,我引入了“测试自动化”方法。

参考文章:AI全自动为你干活的方法(AI操控浏览器) 参考文章:苏江:单凭这一个小工具,AI就能颠覆你90%的工作流

6、大体上的提示词1:

  • 生成一份针对xx功能的测试文档,考虑各种使用情况。

7、大体上的提示词2:

  • 根据功能测试文档,使用MCP PlayWright Chromium 打开Localhost:3000 模拟真实用户使用本产品,发现/排查问题。

8、实测发现:它测试的过程中会发现一些漏洞,顺带就修补掉了。

9、以上仅针对web 应用。

以前,开发者要花 50% 的时间自己点点点做测试。 现在,AI 替我完成了 90% 的功能性验证。 我只需要在上线前,作为真实用户体验最后的 10% —— 确保产品不仅“没Bug”,而且“好用”。

10、唯一缺点:耗一点token。

All Posts

Author

avatar for Su Jiang
Su Jiang

Categories

  • AI探索

More Posts

苏江:在中国,企业为什么难以推广AI
AI探索

苏江:在中国,企业为什么难以推广AI

苏江:在中国,企业为什么难以推广AI

avatar for Su Jiang
Su Jiang
2025/11/26
Stop Coding, Start Vibe Coding: The New Programming Paradigm in the GPT-5.2 Era
AI探索

Stop Coding, Start Vibe Coding: The New Programming Paradigm in the GPT-5.2 Era

A deep dive into the concept and practice of Vibe Coding. From Andrej Karpathy's definition to Y Combinator startups' adoption, explore how to command AI to write production-grade code using natural language.

avatar for Su Jiang
Su Jiang
2025/12/13
Tailscale + VPS: The Ultimate Network Setup for Remote AI Coding
AI探索

Tailscale + VPS: The Ultimate Network Setup for Remote AI Coding

Use Tailscale mesh networking with a Netherlands VPS as an Exit Node to solve HuggingFace timeouts, GitHub clone failures, and API connectivity issues. Complete workflow for remote AI development.

avatar for Su Jiang
Su Jiang
2026/01/14

Need a Custom Solution?

Still stuck or want someone to handle the heavy lifting? Send me a quick message. I reply to every inquiry within 24 hours—and yes, simple advice is always free.

100% Privacy. No spam, just solutions.

Newsletter

Join the community

Subscribe to our newsletter for the latest news and updates

LogoSu Jiang

AI Developer · Writer · Investor | Exploring AI Applications

TwitterX (Twitter)Email

WeChat: iamsujiang

WeChat QR Code
Scan to add WeChat
Product
  • Features
  • Pricing
  • FAQ
Resources
  • Blog
  • Knowledge Base
Company
  • About Me
  • Contact
  • Waitlist
Legal
  • Cookie Policy
  • Privacy Policy
  • Terms of Service
© 2026 Su Jiang All Rights Reserved.