by otabdeveloper4 · 9mo ago · 0 comments
Lmao. Rofl even.
(Testing is the one thing you would never outsource to AI.)
it could still speculate wrong things, but it wont speculate that the code is supposed to crash on the first line of code
That's not really true.
Making the AI write the code, the test, and the review of itself within the same session is YOLO.
There's a ton of scaffolding in testing that can be easily automated.
When I ask the AI to test, I typically provide a lot of equivalence classes.
And the AI still surprises me with finding more.
On the other hand, it's equally excellent at saying "it tested", and when you look at the tests, they can be extremely shallow. Or they can be fairly many unit tests of certain parts of the code, but when you run the whole program, it just breaks.
The most valuable testing when programming with AI (generated by AI, or otherwise) are near-realistic integration tests. That's true for human programmers, but we take for granted that casual use of the program we make as we develop it constitutes as a poor man's test. When people who generally don't write tests start using AI, there's just nothing but fingers crossed.
I'd rather say: If there's one thing you would never outsource to AI, it's final QA.
It made about 2 mistakes in over 100 tests, and the coverage of the tests was higher than I would have attempted.
So about 2 hours of work instead of 1 or 2 days of boring effort avoided and a better outcome.
I would rephrase that as "all LLMs, no matter how many you use, are only as good as one single pair of eyes".
If you're a one-person team and have no capital to spend on a proper test team, set the AI at it. If you're a megacorp with 10k full time QA testers, the AI probably isn't going to catch anything novel that the rest of them didn't, but it's cheap enough you can have it work through everything to make sure you have, actually, worked through everything.
That doesn't tell you that the code is correct. It tells you that the branching code can reach all the branches. That isn't very useful.