Bamboo 2.7: PHPUnit - No tests found

David Ferguson September 29, 2011

Hi Folks,

Thanks in advance for any help you can provide.

Details:

The plan is very basic: default stage -> default job -> PHPUnit builder

I'm running PHPUnit builder on PHPUnit v3.2.16.

Bamboo 2.7.3 build 2103 - 14 Dec 10.

The build arguments are as follows: PhpUnitTestClass phpunit/PhpUnitTestClass.php

Build Log:

30-Sep-2011 11:17:24 Build PROJECTS-PHPUTEST-JOB1-7 started building on agent Default Agent
30-Sep-2011 11:17:24 Running preRetrieveSourceCode task...
30-Sep-2011 11:17:24 Updating source code to revision: 13550
30-Sep-2011 11:17:24 Source found at '/mnt/jira/Bamboo/xml-data/build-dir/PROJECTS-PHPUTEST-JOB1'. Updating source...
30-Sep-2011 11:17:29 Updated source code to revision: 13550
30-Sep-2011 11:17:29 Running postRetrieveSourceCode task...
30-Sep-2011 11:17:29 Executing build PROJECTS-PHPUTEST-JOB1-7
30-Sep-2011 11:17:29 Running pre-build action: VCS Version Collector
30-Sep-2011 11:17:29 Running pre-build action: Build Number Stamper
30-Sep-2011 11:17:29 Running pre-build action: Clover Grails PreBuild Action
30-Sep-2011 11:17:29 Building started with PhpUnitBuilder
30-Sep-2011 11:17:29
Starting to build 'Project Test Plans - PHPUnit Test - Default Job'
... running command line: /usr/bin/phpunit PhpUnitTestClass phpunit/PhpUnitTestClass.php
... in : /mnt/jira/Bamboo/xml-data/build-dir/PROJECTS-PHPUTEST-JOB1
30-Sep-2011 11:17:29 /usr/bin/nohup: invalid option -- 'l'
30-Sep-2011 11:17:29 Try `/usr/bin/nohup --help' for more information.
30-Sep-2011 11:17:29 PHPUnit 3.2.16 by Sebastian Bergmann.
30-Sep-2011 11:17:29
30-Sep-2011 11:17:29 .
30-Sep-2011 11:17:29
30-Sep-2011 11:17:29 Time: 0 seconds
30-Sep-2011 11:17:29
30-Sep-2011 11:17:29
30-Sep-2011 11:17:29 OK (1 test)
30-Sep-2011 11:17:29 Build process for 'Project Test Plans - PHPUnit Test - Default Job' returned with return code = 0
30-Sep-2011 11:17:29 Running post build plugin 'Artifact Copier'
30-Sep-2011 11:17:29 Running post build plugin 'NCover Results Collector'
30-Sep-2011 11:17:29 Running post build plugin 'Clover Results Collector'
30-Sep-2011 11:17:29 Running post build plugin 'Maven2 Build Processor'
30-Sep-2011 11:17:29 Finalising the build...
30-Sep-2011 11:17:29 Stopping timer.
30-Sep-2011 11:17:29 Build PROJECTS-PHPUTEST-JOB1-7 completed.
30-Sep-2011 11:17:29 Build successful since return code was 0 and the text 'OK' was found.
30-Sep-2011 11:17:29 Running post build plugin on server 'Build Hanging Detection Configuration'
30-Sep-2011 11:17:29 Running post build plugin on server 'NCover Results Collector'
30-Sep-2011 11:17:29 Running post build plugin on server 'Clover Delta Calculator'
30-Sep-2011 11:17:29 Generating build results summary...
30-Sep-2011 11:17:29 Saving build results to disk...
30-Sep-2011 11:17:29 Indexing build results...
30-Sep-2011 11:17:29 Finished building PROJECTS-PHPUTEST-JOB1-7.

Result:

The build succeeds.

Get an error msg listed under the default job:

/usr/bin/nohup: invalid option -- 'l'
Try `/usr/bin/nohup --help' for more information.

Bamboo states 'No tests found'. This is despite the build log showing otherwise.

Possible Reasons Bamboo Can't Find Test Result:

the nohup error (not familiar with this command. The manual indicates it routes I/O streams.)

PHPUnit isn't outputting in JUnit. PHPUnit and JUnit are very similar, but does PHPUnit output in JUnit format by default? Does Bamboo require all test output to be in JUnit or can it handle other formats?

Any ideas?

Thanks so much!

2 answers

0 votes
David Ferguson September 30, 2011

The problem is that Bamboo can't understand PHPUnit output unless logging is enabled. For my version of PHPUnit, 3.2, use the builder 'PHPUnit 3.3.x'. The builder 'PHPUnit' is actually meant for PHPUnit 3.4+. :)

0 votes
David Ferguson September 30, 2011

I'm starting to lean towards PHPUnit being outdated as the cause. There isn't an explicit option to output in JUnit in my version (3.2), it only appears in 3.4+. Does anyone know if PHPUnit outputs in JUnit format be default?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events