Top
Best
New

Posted by df003 7 hours ago

Ask HN: How do you test AI-generated code?

When AI generates code, I first instruct the model to find, fix, and verify any issues. After that, I start the server and test whether it actually works from the user’s perspective.

What I’m looking for is a workflow where issues are received, fixed, tested, and deployed—but it seems that current AI agents aren’t very good at performing browser tests from the user’s perspective.

I’ve tried using the built-in browsers in Codex and Cursor, but they often only checked whether the page loaded. In the end, I had to instruct them step by step on what to do, and it turned out to be cheaper and faster for me to test it myself.

So I’m curious to know how you’ve set up test automation. Are there any services that do this (for individuals, not just enterprises)? If you’re using a harness like Codex, I’d like to know what instructions and skills are needed to get it to perform tests from the user’s perspective.

3 points | 3 comments
dutchcode 7 hours ago|
Blinkof.ai can fix a lot of it for you, it will signup/login, walk through pages and return issues with a prompt to fix it.
rishabhpoddar 6 hours ago||
I ask it to write unit test with close to 100% coverage. This has worked well for me so far
wasting_time 5 hours ago|
How do you unit test a UI?
alexiglesias 4 hours ago|
[flagged]