This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

When you configure a plan, you need to specify which builder should be used for the plan's builds.

はじめる前に

You will need to install PHPUnit and reference the path to your PHP command-line interpreter, (e.g. /usr/bin/phpunit on Ubuntu), to use this builder.

To configure a PHPUnit builder for a plan,

(info) If you are creating a new plan, start at step 5.

  1. Click 'Home' to go to the Dashboard.
  2. Click the 'All Plans' tab.
  3. Locate the plan in the list and click this icon:
  4. The 'Configuration' tab will be displayed. Click the 'Builder' sub-tab.
  5. The 'Builder' sub-tab will be displayed.
  6. In the 'Builder' dropdown, select the PHPUnit builder that you wish to configure for this plan (e.g. "PHPUnit 3"). The builder that you select will become one of the plan's capability requirements. For details please see Specifying a Plan's Capability Requirements.
    (tick) 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.
  7. The screen will refresh to display the builder settings specific to PHPUnit:
    • 'Arguments' — Type the name of the directory/files that will be recursively analysed by PHPUnit. The default value is "." (i.e. the working subdirectory, if specified). You must specify at least one argument.
    • 'System Environment Variables' (Optional) — Specify any additional* operating system environment variables you want to pass to your build; Please note, multiple variables must be separated with spaces, and parameters with spaces must be quoted (e.g 'ANT_OPTS=-Xms200m -Xmx700m'). You can also include Bamboo global or build-specific variables (see Using Global or Build-specific Variables).
      * i.e. additional to the existing environment variables (see Viewing Bamboo's System Information for a list). Note that existing environment variables are automatically available to the builder, thus you don't need to specify them in the 'System Environment Variables' field.
    • 'Working Sub Directory' (Optional) — If you leave this field blank, PHPUnit will look for the build files in the build root directory (which is assumed to be the build's Working Directory, as described in Locating Important Directories and Files). You can override this option by specifying an alternative working directory (which must be a subdirectory of the root directory). For example, if your plan has a build script in a subdirectory, and the script needs to be run from within that subdirectory, you would type the name of that subdirectory in the 'Working Sub Directory' field.
    • 'Log test execution in XML format to file' — Select this check-box if you want PHPUnit to record test results in JUnit format. (Note, this format is also used by TestNG.)
      • 'Test Result File' — this field will display if 'Log test execution in XML format to file' is checked. Enter the location of the file to record JUnit test results.
    • 'Write code coverage data 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).
      • 'HTML Code Coverage Directory' — This field will display if 'Log test execution in XML format to file' is checked. Enter the location of the directory to record HTML coverage data.
    • 'Clover output will be produced' — Select this check-box if you are running Atlassian Clover and want to view its code-coverage data from within Bamboo (see Viewing the Clover Code-Coverage for a Build Result). The following field will be displayed:
      • 'Clover XML Directory' — Specify the name of the directory (including path) where PHPUnit will look for the XML report output file from Clover. Please specify file path relative to your plan's root directory (e.g /home/bamboouser/bamboo-home/xml-data/build-dir/MY_PLAN/), i.e. please do not specify an absolute path.
  8. Click the 'Save'/'Done' button if you are editing an existing plan. If you are creating a new plan, you can either click the 'Save'/'Done' button to create the plan without completing the rest of the wizard (check/uncheck the 'Enable Plan' checkbox to create your plan as enabled/disabled as desired) or click the 'Next' button to go to the next page:
    Specifying a Plan's Capability Requirements