How to integrate PHPUnit in Bamboo?

I was trying to integrate PHPUnit from this article: https://confluence.atlassian.com/display/BAMBOO/PHPUnit

"reference the path to your PHP command-line interpreter" PHPUnit is not an executable...

Do I need ant then?

Can someone give me a step to step instruction?

Thanks

2 answers

This widget could not be displayed.

Hi Forest,

I guess the issue is due to the fact that the path to the PHPUnit executable you have added is pointing to something else. Check this page for the list of exceutables on your Bamboo server /admin/agent/configureSharedLocalCapabilities.action . If you have one listed for PHPUnit, then check against the one listed when you run the following commands on your server:

which phpunit if you are on unix

where phpunit if you are on windows

The idea is that Bamboo should be able to use the executable at build time

This widget could not be displayed.

I personally use composer to manage all of my dependencies for my projects. This includes phpunit. So despite the fact that bamboo supports phpunit "out of the box" I use the following within my build.xml

<target name="phpunit">
<exec executable="${basedir}/vendor/bin/phpunit" failonerror="true" description="Run unit app with PHPUnit ">
<arg line="--verbose -c ${basedir}/phpunit.xml.dist" />
</exec>
</target>

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

54 views 1 0
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