xUnit doesnot work with PHPUnit JUnit Log

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • Component/s: xunit-plugin
    • None
    • Environment:
      Debian squeeze

      Hi,

      i detected a problem with the current xUnit version (1.4.3) when i try to parse JUnit log files when using phpunit 3.6.X (I have tried that with diffrent versions). The build is always marked as stable which in my case is not correct. Here is the console-output:

      [....]
      [exec] Time: 28 seconds, Memory: 17.50Mb
      [exec]
      [exec] There was 1 failure:
      [exec]
      [exec] 1) unit_RankedMatchTest::testFoo
      [exec] Failed asserting that false is true.
      [....]
      [xUnit] [INFO] - [PHPUnit-3.4 (default)] - 1 test report file(s) were found with the pattern 'trunk/build/phpunit/junit.xml' relative to '/var/lib/jenkins/jobs/foo/workspace' for the testing framework 'PHPUnit-3.4 (default)'.
      [xUnit] [INFO] - Check 'Failed Tests' threshold.
      [xUnit] [INFO] - Check 'Skipped Tests' threshold.
      [xUnit] [INFO] - Setting the build status to SUCCESS
      [xUnit] [INFO] - Stopping recording.

      When i looked into the JUnit log file which i generated with "phpunit --log-junit <file>" i can still see the failure:

      [...]
      <testsuite name="unit_FoobarTest" file="/raid/hudson_jobs/foo/workspace/trunk/test/phpunit/unit/proxies/FoobarTest.php" fullPackage="unit" tests="1" assertions="1" failures="1" errors="0" time="0.002090">
      <testcase name="testFoo" class="unit_FoobarTest" file="/raid/hudson_jobs/foo/workspace/trunk/test/phpunit/unit/proxies/FoobarTest.php" line="6" assertions="1" time="0.002090">
      <failure type="PHPUnit_Framework_ExpectationFailedException">unit_FoobarTest::testFoo
      Failed asserting that false is true.

      /raid/hudson_jobs/foo/workspace/trunk/test/phpunit/unit/proxies/FoobarTest.php:8
      </failure>
      </testcase>
      </testsuite>
      </testsuite>
      </testsuites>
      [...]

      I hope you can help me with this. Let me know if you need more information.

      Regards,
      Thomas

            Assignee:
            Gregory Boissinot
            Reporter:
            Thomas Z
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: