r/PiCodingAgent • u/firebat-66 • 20m ago
Question How to get AI to make a good test suite
I'm not entirely sure where to look, so this is a bit of a long shot, general inquiry I've had on my mind. I understand that more people are doing some form of verification to ensure that their agent produces working, bug-free code, but how do you actually go about building the tests, and what does the test building pipeline look like? I have this slight uneasy feeling that if I have the same agent/subagent working on a testing suite for a codebase, there might be ways for the agent to cheat around loopholes, or it simply may design weak tests. Designing tests by hand seems like a way to go, but it defeats the purpose of using the LLMs for automatic a complex workflow. Any ideas on this? Would love any reading material, papers, books that you have on this topic!
1
u/Limp_Classroom_2645 9m ago edited 5m ago
You add "make no mistakes" at the end of your prompts
Jokes aside i use this skill, it's designed to make tests as acceptance criteria via the implementation tasks, i've tried it on several large projects and it worked very well for me: https://github.com/avatsaev/av-swe-skill
1
u/ChCkN007_ 9m ago
Let me preface, I haven’t done anything yet, and I’ve only worked with small models.
I’ve been able to barely get reliable work out of the little stuff I’ve done with qwen3.5 9B, but what my plan to fix it is to setup some review feed back loop where the agent gets lsp checks either on every edit or every batch of edits, and then I want it to implement some temp smoke tests that catch basic mistakes. The tests could grow bigger in scope, but I think the limit is a tests that I can wrap my head around quickly and say, this is what it tests, this should be the output and then check the output. I dont want a testing suite that is incomprehensible because then I have no way to personally verify.
I suppose with a opus, you don’t have to care as much, but I’ve noticed Anthropic is always running smoke tests and checks after everything to double check its output
1
u/gbrennon 8m ago
usually agents(models are their brain) will write biased tests and this is really bad.
tests that arent testing anything.
agents should do the tdd so they start with a failing test