Bamboo CI Server - how to set up PHPUnit testing

I would like to configure Bamboo CI Server. I created two steps:

  • Stage 1: "Code Verification" with code verification.
  • Stage 2: "PHPunit" with testing through phpunit.

Stage 1 is fine, but in stage 2 I have an error. In the build log I:

Starting task 'PHPUnit Testing' of type 'com.atlassian.bamboo.plugins.php:task.builder.phpunit' 12-paź-2014 10:45:49 Beginning to execute external process for build 'CCP - CI - Unit Testing Build - Default Job #4 (CCPCI-UTB-JOB1-4)' ... running command line: /usr/local/bin/phpunit --log-junit test-reports/phpunit.xml --coverage-html test-reports/coverage/html --bootstrap /var/www/html/ccp/core/tests/bootstrap.php --no-configuration /var/www/html/ccp/core/tests ... in: /home/bamboo/bamboo_home/xml-data/build-dir/CCPCI-UTB-JOB1 12-paź-2014 10:45:49 X-Powered-By: PHP/5.5.11 12-paź-2014 10:45:49 Content-type: text/html 12-paź-2014 10:45:49 12-paź-2014 10:45:49 Failing task since text 'OK' was not found in last 250 log entries 12-paź-2014 10:45:49 Parsing test results... 12-paź-2014 10:45:49 Finished task 'PHPUnit Testing' 

If on the server terminal I execute the phpunit command (/ usr / local / bin / phpunit --log-junit test-reports / phpunit.xml --coverage-html test-reports / coverage / html --bootstrap / var / www / html /ccp/core/tests/bootstrap.php --no-configuration / var / www / html / ccp / core / tests), everything is correct (there is an OK answer).

What happened to that?

There are two errors on the assembly overview screen:

  • (Job results summary) No failed tests found, a possible compilation error occurred.
  • (Error summary) Could not find test result reports in the /home/bamboo/bamboo_home/xml-data/build-dir/CCPCI-UTB-JOB1 directory.

I would be grateful for any help.

+7
php continuous-integration phpunit bamboo
source share
1 answer

The solution posted by OP in the comments:

I solved my problem.

I had to add an environment variable to the setenv.sh file:

 JVM_SUPPORT_RECOMMENDED_ARGS="-Datlassian.bamboo.builder.su‌​ccessMarker='OK'" 

Everything works very well.

0
source share

All Articles