Agentic PHPUnit output
I was made a aware of PAO. And while it think it is a good tool I think we can do better by making it more useful for an LLM. The package has options for PHPUnit, Pest and ParaTest. I'm only going ...

Source: DEV Community
I was made a aware of PAO. And while it think it is a good tool I think we can do better by making it more useful for an LLM. The package has options for PHPUnit, Pest and ParaTest. I'm only going to focus on PHPUnit, version 12 in particular. The setup PHPUnit has an option to add extensions. The best way to let PHPUnit know your extension is in the phpunit.xml file. <extensions> <bootstrap class="Tests\Extensions\AgentAwareOutputExtension"/> </extensions> To detect when PHPunit is run inside an agent I used the shipfastlabs/agent-detector library (I saw it in PAO). This library uses well known config variables to detect multiple agents. Because I'm trying out Mistral Vibe now I added a new script to composer.json. "test:agent": "AI_AGENT=1 vendor/bin/phpunit" While PAO uses json as output, I want to use markdown. From the documentation I got that it doesn't show the errors. Which strikes me as odd because you want your coding agent to be able to fix the failing test