this post was submitted on 01 Apr 2024
199 points (97.2% liked)
Technology
59271 readers
4188 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I asked several AIs to write unit and integration tests for my code, and they all literally failed every single time. Some just straight up garbage, others just come up with shit I don't even have in my code. AI is really good if you know what you're doing and can spot what's right and what's wrong. Blindly taking its code is just useless, and dangerous, too.
It’s a matter of learning how to prompt it properly. It’s not a human and thus needs a different kind of instructions.
I find if I write one or two tests on my own then tell Copilot to complete the rest of them it's like 90% correct.
Still not great but at least it saves me typing a bunch of otherwise boilerplate unit tests.
I actually haven't tried it this way. I just asked it to write the tests for whatever class I was on and it started spitting some stuff at me. I'll try your way and see.
"Remember kids, you don't need to learn to program!"