惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
G
Google Developers Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
腾讯CDC
有赞技术团队
有赞技术团队
Vercel News
Vercel News
MongoDB | Blog
MongoDB | Blog
M
MIT News - Artificial intelligence
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
I
InfoQ
Blog — PlanetScale
Blog — PlanetScale
博客园_首页
The Cloudflare Blog
B
Blog
C
Check Point Blog
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
U
Unit 42
D
Docker
月光博客
月光博客
aimingoo的专栏
aimingoo的专栏
博客园 - Franky
A
About on SuperTechFans

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Cursor wrote 14 tests for my feature. Here's what it coul...
Muggle AI · 2026-04-27 · via DEV Community

Muggle AI

Updated April 2026

Last week I let Cursor generate the test suite for a checkout feature I'd just shipped. It wrote 14 AI-generated tests in about 30 seconds. I was genuinely impressed.

Then I read them.

Twelve of the 14 covered the happy path. Some variation of "user has items, user checks out, order is created" — thorough coverage of everything that would have worked anyway. Two caught real regressions I didn't know about: one found that the "back" button after payment threw a JavaScript error, another found that discount codes broke silently with two items in the cart.

Those two were worth having.

What Cursor was actually doing

The tests it wrote came from reading the code. It looked at the functions, inferred expected inputs and outputs, and wrote assertions that matched the implementation. That's exactly what it should do given what it can see.

What it can't see is the user who opens your checkout on an old iPhone, tries to apply a coupon code from an email six months ago, and abandons when the "apply" button stops responding. That flow isn't in the code anywhere. It's in the gap between what you built and how people actually use it.

In infrastructure projects, there are two separate jobs: approving the engineering plans, and inspecting the physical work against those plans. Different people, different timelines. The inspector checks the work against the plans — accurately, consistently, fast. But someone else decides whether the plans account for all the exits. That's the architect's job, done before the inspector shows up. AI test generation is the inspector. Someone still has to write the plans.

Two problems, one confused solution

There are two distinct problems in test coverage:

Authoring: writing tests for flows you've already identified. Tedious, time-consuming, mechanical once you know what to test.

Discovery: figuring out which user flows exist and which deserve a test. Not mechanical. Requires watching real users, reading complaints, or tracing production errors — something that reasons from the outside in, not from the source out.

AI test generation solves authoring. You identify the flows, it writes the code. That's real progress — I'm not dismissing what I got. The two regressions Cursor caught were real, and they were flows that existed in the source code, readable by any tool that could follow the call chain.

Discovery is the harder problem, and it was the harder problem before AI existed. "Which user journeys should I be testing?" is still answered the same way it always was.

What I changed after this

I still use Cursor to generate test stubs. Faster than writing from scratch, reliable on the mechanical gaps.

What I stopped doing: treating "14 tests passed" as a coverage signal. It tells me the code does what the code says it should do. Not that the feature works for the user who shows up with a flow nobody thought to describe.

For the flows I haven't thought of, I need something that starts from the product itself, not the source. Nothing that reads code can close that gap — the user journeys that matter most often don't exist in any code path at all.

AI test generation got a lot better this year. The discovery problem is still the same problem it was.