Turning "Tests as Data" into a test-reviewer agent
A developer applied ideas from Matteo Vaccari's "Tests as Data" article to rewrite the prompt of an agent that writes and reviews tests. The original generic persona lacked guidance on where expected values should come from or what tests must never change. The revised prompt defines a good test as black-box, uses an independent oracle for expected values, favors data tables, and checks which file types each kind of change may modify. An initial review of the work surfaced 21 findings that boiled down to six causes. The biggest flaw was that the reviewer inferred the change type from commit messages, which the author controls, so the check could be bypassed. The fix was to derive the change type from the problem statement instead.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in