Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-12297

PHPUnit on stock EC2 images does not support coverage testing

    XMLWordPrintable

Details

    Description

      STEPS TO REPLICATE:

      1. Set up a Bamboo job with a phpunit task
      2. In that phpunit tasks tick the bottom box that reads 'Generate code coverage report in HTML format'

      RESULT:

      When you run the job the following error is shown in the logs:

      09-Oct-2012 17:58:47	Starting task 'PHP Unit Tests' of type 'com.atlassian.bamboo.plugins.php:task.builder.phpunit'
      09-Oct-2012 17:58:47	
      Beginning to execute external process for build 'Default Job'
      ... running command line: 
      /usr/bin/phpunit
      --log-junit
      test-reports/phpunit.xml
      --coverage-html
      test-reports/coverage/html
      --verbose
      --stderr
      ... in: /home/bamboo/bamboo-agent-home/xml-data/build-dir/JOB1
      09-Oct-2012 17:58:49	PHPUnit 3.4.15 by Sebastian Bergmann.
      09-Oct-2012 17:58:49	
      **09-Oct-2012 17:58:49	The Xdebug extension is not loaded.**
      09-Oct-2012 17:58:49	Failing task since return code was 2 while expected 0
      09-Oct-2012 17:58:49	Parsing test results...
      09-Oct-2012 17:58:49	Finished task 'PHP Unit Tests'
      

      If you untick that code coverage box then the build will run.

      EXPECTED RESULT:

      As the code coverage option is available in Bamboo, XDebug should be available in the default EC2 images so that option will actually work.

      Attachments

        Issue Links

          Activity

            People

              pbruski Przemek Bruski
              mhunter Matthew Hunter
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: