Check Repository Checkout and PHPUnit Capability Before Configuring a Bamboo PHP Plan
Identify what to verify in a Bamboo PHP plan and which project commands and results settings you still need.
This is a readiness checklist, not a runnable plan, because the project commands and applicable Bamboo execution-task settings are not specified. Start by identifying the repository and confirming checkout, then establish the PHP framework and PHPUnit prerequisites. Before adding execution and results tasks, obtain the project's commands and the applicable Bamboo settings. Treat checkout, command execution, and test reporting as separate checks rather than one successful-looking build.
Identify the repository, planned tasks, and trigger
The Bamboo 9.5 PHP guide describes a plan as identifying a source repository, the tasks to run, and when to trigger a build. Its worked example connects to a repository, checks out code, builds it, runs tests, and reports results. That sequence is a useful plan outline, not a set of commands for an undocumented PHP repository.
First identify the intended repository and decide what should trigger this plan. Record the steps the project actually needs rather than assuming that every step in the guide's example applies unchanged. The Bamboo PHP guide says a newly created plan has a default Source Code Checkout task that gets code from the specified repository. Confirm that this task retrieves the intended source before investigating build or test behavior. A successful checkout answers which code arrived; it does not establish what commands to run on that code.
Check the PHP framework and PHPUnit prerequisites
The Bamboo introduction assumes an installed and configured Bamboo instance and calls for the PHP framework and PHPUnit. For PHPUnit, the Bamboo Data Center 10.0 PHP guide documents a server executable capability. Its stated fields are:
Capability type: Executable
Type: PHPUnit
Path: path to the PHPUnit executable
Verify which PHPUnit installation the plan is meant to use, then put that executable's path in the capability. The same guide includes this installation check:
phpunit --version
Where that check applies, use it to confirm the intended installation rather than treating the capability's label alone as proof. It does not run the project's tests.
The guides' Ubuntu php5-cli installation command is an example, not a PHP requirement for this repository. The supplied material specifies neither this project's PHP requirement nor its PHPUnit version. Obtain those prerequisites from the project before turning an example installation procedure into plan setup.
Collect dependency, build, and test commands before configuring execution tasks
A task list needs more than the words build and test. Ask the repository's maintainers or its project documentation which dependency, build, and test steps are required, and where each must run. Record any environment requirements alongside the commands. Do not substitute familiar PHP commands for missing project instructions: the sources establish a Bamboo workflow, not this repository's command line.
Use this as a project-information checklist, with blanks deliberately left for information the supplied guides do not provide:
Intended repository:
Plan trigger:
Required dependency command, if any:
Working directory:
Environment requirements:
Required build command, if any:
Working directory:
Environment requirements:
Required test command:
Working directory:
Environment requirements:
JUnit XML output path produced by the test run:
Applicable Bamboo execution-task settings:
Applicable Bamboo result-collection settings:
The last two entries require information for the Bamboo version being used. Until both the project instructions and those settings are available, this checklist is preparation for configuration, not a runnable plan.
Match PHPUnit's JUnit XML output to Bamboo's results location
The Bamboo 9.5 guide identifies JUnit XML as the format Bamboo requires for PHPUnit results. It also says a custom results location can be specified when the project does not use the conventional directory structure. Neither statement identifies where this project's test run will write XML.
Find the output path in the project's test instructions or configuration. Then, using the applicable Bamboo result-collection settings, make Bamboo read that same location. Do not fill in a conventional-looking path simply because Bamboo can accept a custom one. The point to verify is agreement between the location PHPUnit actually writes and the location Bamboo is configured to read.
Check checkout, command execution, and reported results separately
Once the missing commands and task settings are obtained, assess the plan in order. Confirm that Source Code Checkout retrieved the intended repository. Confirm that the PHPUnit capability points to the intended executable. Then check whether each configured project command ran successfully before interpreting any test report.
Finally, verify that PHPUnit wrote JUnit XML where Bamboo reads it and that Bamboo reports those results. If Bamboo has no results to report, check that handoff before calling it a test failure. Conversely, reported test results are not a substitute for checking whether the earlier dependency or build commands ran as intended. These are different outcomes, and the supplied guides do not provide enough project detail to claim that any of them has already succeeded.
