logoalt Hacker News

madeofpalktoday at 9:59 AM5 repliesview on HN

Tests! Unit tests, integration tests, random adhoc scripts. You know - TDD!

I’ve been working on UI component improvements and it was doing a lousy job until i specifically told it to test in a headless browser to validate it works. I think somewhere in an AGENTS.md i have an instruction to “don’t state your guesses as fact - validate findings and results”.


Replies

Tade0today at 10:22 AM

It bothers me that you have to explicitly state this to the agent. Makes me think what else is missing from that file which also needs to be explicitly stated, but I don't know what don't know. "Do a good job"?

show 2 replies
tester756today at 1:13 PM

>Tests! Unit tests, integration tests, random adhoc scripts. You know - TDD!

Tests =/= TDD

troupotoday at 12:52 PM

> Tests! Unit tests, integration tests, random adhoc scripts. You know - TDD!

Tests onli validate the presence of bugs, not their abscence (Djikstra).

I'll also add that tests look at outputs and don't care how those outputs are derived. E.g. code filtering the entire db in memory will be fine in tests.

show 2 replies
altmanaltmantoday at 10:39 AM

If the agent can write the tests its supposed to pass and we are worried that agent produces quite a lot of slop (which is why we are doing the tests), then what is the defense against test slop? Test the tests?

show 3 replies
KptMarchewatoday at 10:41 AM

In this particular case tests won't help you, without the actual data. But overall you're right.

show 1 reply