Parse phpunit html without using PHPunit task

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

https://confluence.atlassian.com/bamboo/phpunit-289277055.html

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

This widget could not be displayed.

Update

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 Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

203 views 1 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