This page describes how to configure a PHPUnit builder for a Job.
On this page:
Configuring a PHPUnit Builder for a Job
始める前に
To use this builder, you will need to install PHPUnit and reference the path to your PHP command-line interpreter, (e.g. /usr/bin/phpunit on Ubuntu).
To configure a PHPUnit builder for a Job: If you are creating a new Plan
or [new Job|Create a Job]
, start at step 2.
Navigate to the Job's configuration pages, as described on Editing a Job.
In the 'Builder' dropdown, select the PHPUnit/PHPUnit 3.3.x builder that you wish to configure for this Job (e.g. "PHPUnit 3"). The builder that you select will become one of the Job's capability requirements. For details please see Configuring a Job's Requirements. Tip: If you want to configure a new shared local builder capability in Bamboo, you can do so by clicking the 'Add New Builder' link and entering the builder details in the window that displays. Once you have added the new builder, it will be available for you to select from the 'Builder' dropdown.
The screen will refresh to display the builder settings specific to PHPUnit:
'Arguments' — Type the name of the directory/files that will be analysed recursively by PHPUnit. The default value is "." (i.e. the working subdirectory, if specified). You must specify at least one argument.
If required, update the system environment variables and working directory settings:
Update the following build parameters:
'Log test execution to XML file' — Select this check box if you want PHPUnit to record test results in JUnit format. This format is also used by TestNG. If you select this check box, the following field is displayed:
'Test Result File' — Enter the location of the file to record JUnit test results.
'Generate code coverage report in HTML format' — Select this check box if you want PHPUnit to generate code coverage data in HTML format (e.g. for PHPUnit HTML Code Coverage reports). If you select this check box, the following field is displayed:
'HTML Code Coverage Directory' — Enter the location of the directory to record HTML coverage data.
'NCover output will be produced' — Do not select this option. NCover is a code coverage tool that supports .NET projects.
'Use Clover to collect Code Coverage for this build' — Select this check box if you are running Atlassian Clover and want to collect code coverage data to view from within Bamboo (see Viewing the Clover Code-Coverage for a Build Result). If you select this check box, you can specify one of the following Clover 'Integration Options':
'Automatically integrate Clover into this build' — For this option, you have two sub options — 'Generate a Clover Historical Report' and 'Generate a JSON report'. The Clover Historical Report shows the current coverage results compared with previous Clover code coverage reports. The JSON report gives the Clover results in a format ready for embedding into applications or external report views. You will also need to insert a Clover license (evaluation licenses are available) into the field provided. Please see Enabling the Clover Plugin for more information.
'Clover is already integrated into this build and a clover.xml file will be produced' — Use this option when you already have Clover configured to generate a report. You will also need to specify where the Clover XML report is being generated, under 'Clover XML Location'. For this, specify the name of the directory (including path) where PHPUnit will look for the XML report output file from Clover. Please specify a file path relative to your Job build's root directory, for example: