Re:I Am Tired of AI
by skydhash on Friday September 27, 2024 @12:54PM
(#41672864)
Just one nitpick. The thing about test is that it’s repetitive enough to be automated (in a deterministic way) or abstracted into a framework. You don’t need an AI to generate it.
[ Parent
| on HN ]
Re:I Am Tired of AI
by closeparen on Friday September 27, 2024 @01:57PM
(#41673675)
While I occasionally have the pleasure of creating or working with a test suite that's interesting and creative relative to the code under test, the vast majority of unit tests by volume are slop. Does it call the mock? Does it use the return value? Does "if err != nil { return err }" in fact stop and return the error?
This stuff is a perfect candidate for LLM generation.
I find it helpful for generating automated test suites in the style of the rest of the codebase. When working across multiple projects and clients, it reduces the mental load of having to remember or figure out how tests are expected to work in each codebase.
I agree with your theory about tests. The reality of it is most code is garbage - often including my own - and in a lot of environments, the task is to get the job done in a way that fits in with what's there.