Back
RCreddit.com
19
·16 hr ago·Dev community · RSS

A green AI test suite can be a group project between the code and its mocks

View original
Open source

Heat trend

New
Latest 24h versus previous 24h · 7-day curve

The percentage is based on available heat signal, not comment count or independent people.

AI summary

A green AI test suite can be a collaborative project between the code and its mocks. While AI can generate most of the test suite, at least one test should originate externally, such as a captured API payload or an old migration fixture. This external input prevents the code from grading its own homework with an answer key it also created, ensuring a more robust and independent evaluation of the feature written by the agent.

The agent writes the feature.

The same agent writes mocks that agree with it.

Then the tests pass.

I still let AI generate most of the suite, but one test has to come from outside that loop: a captured API payload, an old migration fixture, two requests racing, something the implementation did not invent for itself.

Otherwise the code is grading its own homework with an answer key it also wrote.

A green AI test suite can be a group project between the code and its mocks · BuzzRadr