Hacker News new | ask | show | jobs
by SpicyLemonZest 47 days ago
I just don't understand the premise. If we're fully committed to agents, what does it mean to talk about a test being hard to maintain or requiring hardcore plumbing? "Hey Claude, can you please mock out Component X and write a test suite capturing behaviors A, B, C of component Y. Thanks!" When in the process of typing this would I go "ughh", and why would I prefer to receive a SCENARIOS.md as output rather than a test suite?
1 comments

How stable is the boundary of Component X?

At some point the agent rewrites Component X, or X+Y, and now many or all of your tests that hit it directly are invalid and need to be rewritten. That introduces bugs, you're changing the tests and code at the same time, so you don't know if the new ones cover the same stuff as the old one.

I won't be "fully committed to agents" re: test-writing until they reach the point where they demonstrate that they're taking contract and component boundary stability into account in placing their tests. Currently I still need to intervene.

And the tests I point it at doing instead of the ones it does by default are currently catching more would-be or latent bugs than ever before, because we're changing stuff so much faster.

Agents won't make you better, quality-wise, unless you were in a lower-percentile of code-writing ability. But they'll make you a lot faster at raw change count. How good or bad that is depends on (a) the situation the product is in and the tolerance for issues/regressions, (b) how much existing judgment and best practices you can wrangle into position on top of those changes to make the path of least resistance for the agent be smoother.

That really to the point of tests. You WANT to know when they are invalidated. You want them to be fairly easy to read.

Good tests are so easy to write with these models, and so easy to fix as the code changes it they are too closely tied to the implementation.