Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can generate a coverage report in pipeline?

Sanin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 7, 2019

In my phpunit.xml file I have a list of log types.

<logging>
    <log type="coverage-php" target="results/clover-unit.cov"/>
    <log type="junit" target="results/phpunit/phpunit.xml" />
    <log type="coverage-clover" target="results/clover.xml"/>
    <log type="coverage-html" target="./results" lowUpperBound="35" highLowerBound="70"/>
</logging>

So when I run "vendor/bin/phpunit", it creates a folder names results and inside it contains list of folders and files with visual description.

So far I am trying to implement it to bitbucket pipeline.

In the yml file, I have following lines.

- vendor/bin/phpunit --coverage-text --colors=never --coverage-html="./reports"
artifacts:
 - reports

But I could not generate these bunch of folders. Can anybody help me?

Thank You.

1 answer

0 votes
Alexander Zhukov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 19, 2019

Hi @Sanin . Try to use glob pattern when defining your artifacts:

- vendor/bin/phpunit --coverage-text --colors=never --coverage-html="./reports"
artifacts:
 - reports/**

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events