|
|
|
|
|
by simonw
219 days ago
|
|
I find coding agents can produce very high quality tests if and only if you give them detailed guidance and good starting examples. Ask a coding agent to build tests for a project that has none and you're likely to get all sorts of messy mocks and tests that exercise internals when really you want them to exercise the top level public API of the project. Give them just a few starting examples that demonstrate how to create a good testable environment without mocking and test the higher level APIs and they are much less likely to make a catastrophic mess. You're still going to have to keep an eye on what they're doing and carefully review their work though! |
|
I find this to be true for all AI coding, period. When I have the problem fully solved in my head, and I write the instructions to explicitly and fully describe my solution, the code that is generated works remarkably well. If I am not sure how it should work and give more vague instructions, things don't work so well.