A better way to end-to-end test your webapp

2026年1月6日

AI 摘要 AI 生成,可能有误

The article argues that end-to-end tests, despite being flaky to run and annoying to write, are the best way to test a web application because most bugs occur at interfaces, which unit tests miss and client-side integration tests handle poorly. Since good end-to-end tests see everything, only a few are needed to cover large portions of the app's ecosystem.

What's the problem with end-to-end tests? They're flaky to run and annoying to write. But the best way to test your application.

Unit tests miss the crucial part where most bugs happen – the interfaces. Integration tests work great on the server, but they're clunky on the client. Too many API calls.

A good end-to-end test sees everything. You don't need many to cover large swathes of your ecosystem. But let me guess: You're not using these. Too flaky to run, too annoying to write.

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Swizec Teller

Hillclimbing your prompts

AI 摘要The article describes using hillclimbing to recursively self-improve a prompt for a blog article category classifier. After a few iterations, the classifier's precision improved dramatically from 28.7% to 70.6%, though recall slightly decreased from 51.7% to 47.3%. Overall, the author reports the approach worked wonderfully, with F1 score rising from 36.9% to 56.7%.

Software has no value

AI 摘要The article argues that software has no inherent value, humorously noting that nobody buys software just to admire it. Instead, software is merely a means to an end, and its true worth lies in what it enables people to accomplish.

How do we auto-approve and merge 60% of PRs?

AI 摘要The author, still overwhelmed by code review, explains how they raised auto-approved and merged pull requests to about 16% and aims to reach 60%. They argue that 100% automation isn't realistic because some changes are high-risk, require coordinated deployments, or need additional feedback before they're ready. They also note that manual review preserves valuable mentoring opportunities for junior team members.

No more tech debt

AI 摘要The author celebrates completing a design system migration for the first time in their career, finding the new math on big rewrites gratifying. They argue that at scale, a company is perpetually mid-migration or mid-rewrite, since organizations change every few months and systems built years ago become unfit for purpose. Therefore, how a team handles these migrations is what truly matters.

When code is cheap, judgement becomes the job

AI 摘要The author describes working at a 21-person engineering organization that ships code with remarkable velocity—merging multiple times per day, auto-approving 16% of pull requests, and letting AI write 97% of their code—while still maintaining reliability in a business where outages cost thousands of dollars. The central takeaway is that when AI makes writing code cheap and fast, human judgment becomes the engineer's primary job.