Parse phpunit html without using PHPunit task

Based on this article I can setup a PHPUnit task to run my PHPUnit tests

However, I run my PHPUnit tests through paratest so they can run in parallel and execute much faster. It still outputs the same PHPUnit html and xml.

I would like to know how I can setup the PHPUnit task to parse the details without having to actually run the phpunit tests.

1 answer

1 vote


Similar to the referenced JUnit task referenced below, the PHPUnit task also supports the (unfortunately undocumented) advanced option to Pick up test results that where created outside of this build - assuming it also works in a similar way, this will hopefully allow to achieve your goal (haven't used it myself though):

image2015-8-28 18:12:3.png

Initial Answer

I'm not familiar with paratest, however, it seems the XML output you are referring to is in the popular JUnit format:

--log-junit           Log test execution in JUnit XML format to file

Bamboo supports various tests tasks besides PHPUnit, and most/all of them support this JUnit test output format, including the JUnit task itself of course:

As visible in the screenshot, the task's main feature is to parse test results generated within the current build (or preceding ones via the advanced option). Accordingly, it should be able to pick up the test results generated by paratest as well.

Thanks, but I am trying to get it to parse the html output, so I can see which files and lines are covered.

@Ryan McLaughlin - I have updated my answer with a potential solution based on the PHPUnit task - as mentioned, I haven't used that myself yet, so I'm not sure it will actually cover both report types, but would assume it does (it would be weird to implement two different code paths for both conceptually identical features).

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

72 views 3 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you