| ▲ | CharlieDigital 10 hours ago | |
AI will write tests to the level of depth that you ask it to. Try:
What's useful is to have a second agent that reviews the tests impartially and trim the ones that are low signal.You also need to understand why agents write high volume, low value tests: because other ways of exercising the code (e.g. Playwright, E2E, curl) are even more expensive and not as consistent. So you have some recourse here by: 1) giving agents another way to exercise the code (e.g. provide it a REPL to your code) or 2) tell it to write some unit tests as explicit only (does not run in CI). For our tests, we also added a small helper library[0] that cleans up tests to make them easier to read (smaller context for both humans and agents) as well as to write. Agents write average code by default. Your job as an engineer in this age is to help agents write good code. | ||
| ▲ | an hour ago | parent [-] | |
| [deleted] | ||