PhpUnderControl and PHPUnit always do not work with 255 code

I have the following file setting build.xmlin phpUnderControl.

    <target name="phpunit">
    <exec executable="phpunit" dir="${basedir}/httpdocs" failonerror="on">
        <arg line="--log-junit ${basedir}/build/logs/phpunit.xml
                --coverage-clover ${basedir}/build/logs/phpunit.coverage.xml
                --coverage-html ${basedir}/build/coverage
                --colors
                ${basedir}/httpdocs/qc/unit/CalculatorTest.php" />
    </exec>
</target>

For some genuine reason, the assembly always fails with the message below.

phpunit:
 [exec] PHPUnit 3.4.15 by Sebastian Bergmann.
 [exec] 

BUILD FAILED
/opt/cruisecontrol-bin-2.8.3/projects/citest.local/build.xml:30: exec returned: 255

I run a very simple unit test manually in the unit directory and return PHPUnit.

PHPUnit 3.4.15 by Sebastian Bergmann.

.

Time: 0 seconds, Memory: 5.25Mb

OK (1 test, 1 assertion)

Does anyone know why he continues to refuse to build when all the tests are in order?

My build script has a clean method that deletes and writes files, so its not like that. I also manually deleted the log files, just in case that script. And changed the owner of the log directories so that they are writable.

If that matters, phpunit.xml is empty after running PHPUnit.

Thank.

UPDATE: , failonerror="on", , , PHPUnit - 255, , , , , !

+3
5

255 - , PHP ( ) .

script, , , ?

PHP? , error_reporting(E_ALL);?

+6

, "exec : 255" CodeCoverage, error_reporting (E_ALL), Pekka. init_set('display_errors','on');. " ... exhaused" .

+1

, -. nginx - ( ) .

0

testuite phpunit.xml, assertXXX

0

Selenium, PHPUnit, PHPUnderControl CruiseControl ( http://www.siteconsortium.com/h/p1.php?id=php002)

Just a very simple example, but I was able to get it to work like this. Start with something simple and copy another material.

<?xml version="1.0" encoding="UTF-8"?>
<project name="test" default="build" basedir=".">

<target name="build">
  <exec executable="C:\\PHP\\phpunit.bat" dir="C:\\workspace\\proj\\phpunit" failonerror="on">
     <arg line="--log-junit C:\\workspace\\proj\\build\\logs\\phpunit.xml
           --configuration C:\\workspace\\proj\\phpunit.xml
           --include-path C:\\trunk\\includes C:\\workspace\\proj\\includes" />
     </exec>
  </target>
</project>
0
source

Source: https://habr.com/ru/post/1756219/


All Articles