xUnit plugin "stopProcessingIfError"

168 views
Skip to first unread message

christop...@googlemail.com

unread,
Feb 21, 2022, 7:54:56 AM2/21/22
to Jenkins Users
Hi,

I have unit-test results in two different formats (junit as well as googletest) and used to collect these using the xunit-plugin. Now I found out accidentally that I parsed a junit file with the googletest format which delivered a console output like "error parsing blablabla" however the build went on and at the end the information was lost.
To handle that I set the parameter "stopProcessingIfError:true" and simultaneously fixed the assignment.
In the next build I had no error any longer but the processsing still caused an error (however it did not fail the build which is another issue).
Here is my script:
  xunit (
        thresholds: [ failed( unstableThreshold: '0' ) ],    
            tools: [ GoogleTest( pattern: "test\\*.gxml", failIfNotNew: true, stopProcessingIfError:true )
                    , JUnit( pattern: "test\\*.xml", failIfNotNew: true, stopProcessingIfError:true  )] )
And this is the output when it fails without any notice what the error might be:

02:29:58 INFO: Processing GoogleTest-1.8
02:29:58 INFO: [GoogleTest-1.8] - 15 test report file(s) were found with the pattern 'test\*.gxml' relative to 'D:\workdir\workspace\MyBuild' for the testing framework 'GoogleTest-1.8'.
02:30:01 INFO: Processing JUnit
02:30:01 INFO: [JUnit] - 33 test report file(s) were found with the pattern 'test\*.xml' relative to 'D:\workdir\workspace\MyBuild' for the testing framework 'JUnit'.
02:30:02 ERROR: Validation error
Did I maybe missunderstand the parameter? Any idea how I can get more information about the actual error? Maybe a bug of the plugin?

May thanks for any kind of help!
Christoph

christop...@googlemail.com

unread,
Feb 22, 2022, 6:38:13 AM2/22/22
to Jenkins Users
Oh, there's something else, I missed an output line to copy (this time with debug- and release-tests in one run:

12:24:17 INFO: Processing GoogleTest-1.8
 12:24:17 INFO: [GoogleTest-1.8] - 30 test report file(s) were found with the pattern 'test*\*.gxml' relative to 'D:\workdir\workspace\MyBuild-win32vc19' for the testing framework 'GoogleTest-1.8'.
12:24:18 INFO: Processing JUnit
12:24:18 INFO: [JUnit] - 67 test report file(s) were found with the pattern 'test*\*.xml' relative to 'D:\workdir\workspace\MyBuild-win32vc19' for the testing framework 'JUnit'.
12:24:18 ERROR: Validation error
12:24:18 ERROR: Validation error
12:24:20 INFO: Check 'Failed Tests' threshold.

Is there something wrong with the threshold? It would be great to have a little more verbose message here....

christop...@googlemail.com

unread,
Feb 24, 2022, 10:25:31 AM2/24/22
to Jenkins Users
It starts getting weird:
I found an xml-file in a totally different format as test output at the same location. I whished, the parser would diplay the file name. I modified the pattern to remove that from the parser input.
Now xunit runs witout any Error in the output but the following steps are still not executed without any indication of a cause. And the build is successful at the end.
Any ideas?

christop...@googlemail.com

unread,
Mar 5, 2022, 8:03:12 AM3/5/22
to Jenkins Users
I don't get it:
when I execute my actual test in a try-block and move the xunit-step in the finally-block everything works.
Is there any explanation for that behaviour?
Reply all
Reply to author
Forward
0 new messages