Daily Tech Briefing
AI 科技速览

每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。

AI 快讯
HackerNoon AI · 2026/7/24 06:38:13
Nobody Needs an AI That Writes Tests. We Need One That Reads Failures.

Nobody Needs an AI That Writes Tests. We Need One That Reads Failures.

AI 中文解读
AI写测试用例?这不是我们真正需要的。这篇来自HackerNoon的文章一针见血地指出:真正的瓶颈不是写测试,而是每天早晨面对一大堆“红色失败”时,谁来判断这些失败到底意味着什么。 说白了,写几千条测试用例并不难,难的是清晨打开电脑,看到60条测试飘红——其中80%可能根本不是代码问题,而是网络波动、硬件老化、重启超时等环境噪音。作者形象地称之为“早间分诊税”,工程师每天要花一个完整的人天去逐一排查这些假报警。尤其在涉及物理硬件的测试中,一次失败可能有四种原因:代码回归、固件变化、设备老化、测试本身竞态条件,只有第一种才是真缺陷。现在大多数AI工具只盯着生成测试用例,却忽略了最耗时的分诊环节——这就像修水管的人只负责往墙上打洞,不管漏水点到底在哪里。 如果AI能学会“看失败”——自动区分环境噪音和真实缺陷,对普通开发者意味着什么呢?你将不再被周末的测试报告吓出一身冷汗,不再需要反复重跑确认。团队可以把精力从无意义的排查中解放出来,测试才真正成为安全网,而不是一种心理安慰仪式。对于使用智能硬件、自动驾驶或是物联网设备的用户,这意味着产品迭代更快、bug更少,因为工程师终于有时间去修真正的漏洞了。
Discover AnythingSignupWrite 184 readsNobody Needs an AI That Writes Tests. We Need One That Reads Failures.byAnil Reddy PutlacherubyAnil Reddy Putlacheru|@anilreddy2581Sr SDET at I am a SDET , Focused on AI And MLSubscribeJuly 24th, 2026TLDR Your browser does not support the audio element.Speed1xVoiceDr. One Ms. Hacker byAnil Reddy Putlacheru@anilreddy2581byAnil Reddy Putlacheru|@anilreddy2581Sr SDET at I am a SDET , Focused on AI And MLSubscribebyAnil Reddy Putlacheru|@anilreddy2581Sr SDET at I am a SDET , Focused on AI And MLSubscribeEvery AI-for-testing demo I have sat through follows the same script. Someone points a model at a requirements doc, it emits forty test cases, and the room nods. It's a good demo. It also solves a problem I've never actually had.Writing tests was never the bottleneck. I've worked on suites where the tests wrote themselves out of habit, one per bug, one per ticket, until there were thousands of them running every night. The bottleneck showed up the next morning, when sixty of them were red and someone had to decide what that meant.That decision is the job. And it's the part almost nobody is automating well.The morning triage taxRun the arithmetic on a mid-sized suite. Say two thousand tests, nightly, with a three percent failure rate. That's sixty red tests waiting when the team logs on. In my experience, four out of five of those aren't defects at all. They are a stale fixture, a timing window that closed, a device that did not finish rebooting, a data seed that drifted, a network hiccup in the middle of a retry.(Illustrative numbers. If the failure rate looks low to you, you have a bigger problem than this article can fix.)Someone still has to open all sixty. Ten minutes each, if the logs are decent. That's a full engineer-day, every day, spent sorting noise from signal. Teams call it triage and treat it like weather, something that happens to them. It's the most automatable workload in the entire pipeline, and it sits there untouched while everyone builds test generators.Hardware is where this gets uglyIf your tests run against pure software, you can at least assume the machine underneath you is honest. I've spent a good chunk of my career on integration testing where the system under test includes physical hardware, and that assumption dies on day one.A single red test on a device rig has, roughly, four candidate explanations:The code regressed.The firmware on the device changed, and the test is fine.The rig itself drifted. A cable, a calibration, a sensor, a thermal condition.The test is racing something physical and lost this time.Only the first one is a bug. The other three are why nobody trusts the suite by month six, and why teams start rerunning failures until they go green. That's the moment the suite stops being a safety net and becomes a ritual.A stack trace can't distinguish between those four. Neither can an LLM staring at a stack trace. Which brings me to the thing I actually want to argue.The agent is the last thing you buildEvery diagnostic agent I've seen fail, failed for the same reason. The pipeline underneath it had already thrown away the evidence.Typical CI keeps a stack trace, a truncated log, and a pass/fail bit, with seven-day retention. The device serial output, the screenshot at failure, the firmware version on the rig, the calibration timestamp, the last ten runs of that same test, the data seed hash: gone, or never captured, or sitting in four different systems with no shared key.You can't reason your way out of missing evidence. If a human engineer couldn't diagnose the failure from what your CI stores, a model can't either. It will just sound more sure of itself.So the first thing to build isn't the agent. It's the failure bundle: one object, one ID, everything a diagnosis could possibly need.failure_bundle:  run_id: nightly_1187  test_id: scan_pipeline.calibration_drift  status: failed  code_diff_since_last_pass: [commit_a1b, commit_c4d]  firmware_version: 3.
分享
阅读原文