2 hours ago · Tech · hide · 0 comments

We have a PHPUnit test suite that's taking a while, so I wanted to find out the which tests were taking the longest. With the help of Google, I discovered the --log-junit phpunit-results.xml command line option to phpunit which creates an XML file with the info I need. Running on Slim's codebase, we create the XML file with: $ ./vendor/bin/phpunit --log-junit phpunit-results.xml ... Tests: 436, Assertions: 832, PHPUnit Notices: 37. It looks like this (formatted by me): $ head -n 7 phpunit-results.xml <?xml version="1.0" encoding="UTF-8"?> <testsuites> <testsuite name="/Users/rob/Projects/slim/slimphp/Slim/phpunit.xml" tests="436" assertions="832" errors="0" failures="0" skipped="0" time="0.595106"> <testsuite name="Slim Test Suite" tests="436" assertions="832" errors="0" failures="0" skipped="0" time="0.595106"> <testsuite name="Slim\Tests\Routing\RouteContextTest" file="/Users/rob/Projects/slim/slimphp/Slim/tests/Routing/RouteContextTest.php" tests="5" assertions="14" errors="0"…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.