Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Not A Defect
-
Component/s: xunit-plugin
-
Labels:None
-
Similar Issues:
Description
Just updated to the latest xUnit version and PHPUnit's XML logfile is no longer processed correctly:
[xUnit] Starting to record.
[xUnit] [PHPUnit-5.1.6 (default)] - Processing 1 files with the pattern 'build/logs/junit.xml' relative to '/usr/local/hudson/jobs/php-object-freezer/workspace'.
[xUnit] [WARNING] - The file '/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml' is an invalid file. It has been ignored.
[xUnit] The plugin hasn't been performed correctly: java.io.IOException: No test report files were found. Configuration error?
.
.
.
Finished: FAILURE
Attachments
Activity
Just before I opened this issue, I updated through the plugin manager. It said that 1.2 was the current version (while the wiki showed 1.4).
Updated to 1.4:
[xUnit] Starting to record.
[xUnit] Can't create the path /usr/local/hudson/jobs/php-object-freezer/workspace/generatedJUnitFiles. Maybe the directory already exists.
[xUnit] [PHPUnit-3.4 (default)] - Processing 1 files with the pattern 'build/logs/junit.xml' relative to '/usr/local/hudson/jobs/php-object-freezer/workspace'.
[xUnit] [WARNING] - The file '/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml' is an invalid file.
[xUnit] [WARNING] At line 3 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'fullPackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 3 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'package' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 4 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'fullPackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 4 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'package' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 4 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'subpackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 34 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'fullPackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 34 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'package' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 34 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'subpackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 48 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'fullPackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 48 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'package' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 48 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'subpackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 69 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'fullPackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 69 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'package' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 69 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'subpackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 74 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'fullPackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 74 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'package' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 74 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'subpackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 77 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'fullPackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 77 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'package' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 77 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'subpackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 88 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'fullPackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 88 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'package' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 88 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'subpackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 93 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'fullPackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 93 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'package' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] At line 93 of file:/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'subpackage' is not allowed to appear in element 'testsuite'.
[xUnit] [WARNING] - The file '/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml' has been ignored.
[xUnit] The plugin hasn't been performed correctly: java.io.IOException: No test report files were found. Configuration error?
.
.
.
Finished: FAILURE
The update manager usually takes a delay to display the recent versions.
With the newest version of xUnit, there are validations on input files.
Following the console, your input file doesn't match the expected specification given by the XSD here:
http://fisheye.jenkins-ci.org/browse/Hudson/trunk/hudson/dtkit/dtkit-default/dtkit-default-junit/src/main/resources/com/thalesgroup/dtkit/junit/phpunit-1.0.xsd?r=HEAD
Maybe the cuurent xsd (writes for PHPUnit 3.4) is not completly correct (it misses your uses cases) or maybe you are using an another PHPUnit version?
Which version do you use?
Could you send me your PHPUnit input file?
http://ci.thephp.cc/job/php-object-freezer/ws/build/logs/junit.xml is the XML that is generated by PHPUnit 3.5-dev (3.4 should be the same).
I have no idea who wrote the XSD, it was not me (I am the creator of PHPUnit).
It's me, the author of the XSD.
I think each input and output must follow a specification with a version.
But I am not a PHPUnit expert and my XSD (format 1.0) was written manually with some exemples.
You can find my exemples here:
http://fisheye.jenkins-ci.org/browse/Hudson/trunk/hudson/dtkit/dtkit-default/dtkit-default-junit/src/test/resources/com/thalesgroup/dtkit/junit/phpunit
Are there any existing XSD for PHPUnit output XML files for each PHPUnit version?
Or could you create them?
In my opinion, attaching a specification (XSD) for each output format of each PHPUnit version is the only way to give some tracability.
What are your opinion?
I never wrote an XSD for the PHPUnit XML logfiles and currently lack the time to do so.
Code changed in hudson
User: : gbois
Path:
trunk/hudson/dtkit/dtkit-default/dtkit-default-junit/src/main/resources/com/thalesgroup/dtkit/junit/phpunit-1.0.xsd
trunk/hudson/dtkit/dtkit-default/dtkit-default-junit/src/test/java/com/thalesgroup/dtkit/junit/PHPUnitTest.java
trunk/hudson/dtkit/dtkit-default/dtkit-default-junit/src/test/resources/com/thalesgroup/dtkit/junit/phpunit/testcase4/junit-result.xml
trunk/hudson/dtkit/dtkit-default/dtkit-default-junit/src/test/resources/com/thalesgroup/dtkit/junit/phpunit/testcase4/testresult.xml
http://jenkins-ci.org/commit/32806
Log:
Fixed JENKINS-6951
I updated the XSD.
Could you upgrade to xUnit 1.5 and let me know?
As soon as the plugin manager offers me 1.5, I will.
As soon as the plugin manager offers me 1.5, I will.
You can force update - go to Manage Hudson / Plugin Manager / Advanced tab, click Check now.
Updated to 1.5 now (thanks for the hint about forcing). Looks much better now:
[xUnit] Starting to record.
[xUnit] Can't create the path /usr/local/hudson/jobs/php-object-freezer/workspace/generatedJUnitFiles. Maybe the directory already exists.
[xUnit] [PHPUnit-3.4 (default)] - Processing 1 files with the pattern 'build/logs/junit.xml' relative to '/usr/local/hudson/jobs/php-object-freezer/workspace'.
[xUnit] [INFO] - Converting '/usr/local/hudson/jobs/php-object-freezer/workspace/build/logs/junit.xml' .
[xUnit] Stopping recording.
.
.
.
Finished: SUCCESS
Thanks!
For another project I now get:
[xUnit] [WARNING] At line 4 of file:/usr/local/hudson/jobs/php-code-browser/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'category' is not allowed to appear in element 'testsuite'.
The list of optional attributes for the file element is: category, namespace, fullPackage, package, subpackage
Should be fixed with xUnit 1.6
My problem is not with Jenkins. Sorry.
Regarding the log, you don't have the latest xUnit version : 1.4
You can download the plugin here:
http://download.java.net/maven/2/org/jvnet/hudson/plugins/xunit/1.4/
In the new version, the PHPUnit version used is the latest stable PHPUnit version 3.4 and all vioations are display in the console.