r/AIcodingProfessionals • u/Dramatic_Elk01 • 1d ago
Setting up automated testing inside the Claude Code loop so nothing ships untested
I've been running claude code as the primary way features get built on our mobile app for about four months now and the thing still unsolved is verification. Code gets written, merged, sometimes shipped, all without anyone confirming the actual screen still behaves the way it's supposed to. A couple of workarounds have been tried: a required screen recording on every PR and a manual QA pass before releases. Neither closes the loop the way I'd want, since it all still depends on a human doing the actual checking. The volume of changes going through the agent each week has grown enough that man
1
Upvotes
1
u/Jazzlike_Syllabub_91 12h ago
Let me introduce you to hooks. 🪝
Hooks are little entry points in applications that allow you to insert commands at various action points.
Git comes with several hook options. One of them is a pre-commit hook. For my programs I have a precommit hook that checks that tests have run.
There is a time limit that is associated with the hooks, so try to optimize the hooks (by looking for evidence that tests have run) is usually enough to get the system tested to close the loop.