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

0 vote

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,321 views 0 5
Read article

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