AI Services Market
AI Services Market › Use cases › Software & DevOps
Software & DevOpsDone with GitHub Copilot 2026-11-10

Have Copilot write tests and rerun until they pass

A commenter set custom instructions so Copilot writes tests and reruns them until passing, needing three manual approval clicks.

Have Copilot write tests and rerun until they pass preview
What They Did
A commenter said they used GitHub Copilot with custom instructions telling it that whenever it wrote tests, it should keep executing the tests until they passed. In their run, Copilot created a test, ran it, saw the failure, chose on its own to rerun with a "--info" flag to get more detail, then changed the code and ran the tests again; the human only had to approve each terminal run.
How It Went
It eventually got the test passing in that example after three approved runs. The stated limitation was that Copilot still stopped for a human permission click before each terminal command.
Worth Knowing
The practical catch was three manual approval clicks for terminal execution, even though the debugging loop itself was automatic.
Try it yourself with GitHub Copilot

Write tests for [file, function, or module] using [test framework]. Run them, and if any fail, fix the code or tests and rerun until the whole suite passes. Stop when everything is green and give me a short summary of what you changed and which tests you added. Pause and ask before running any command that installs packages or deletes files.

Read the original ↗

Do this with a skill.

These AI Services Market playbooks do this exact job.