Jenkins Robot framework plugin and output.xml parse issue

2,451 views
Skip to first unread message

Yogesh Patil

unread,
Dec 6, 2016, 5:57:02 AM12/6/16
to robotframework-users
Hi 

I am using the Robot framework for more than a year and across three different projects. 

This time round I am getting random parse failures in output.xml file which I can not ignore any more as I am now using RobotFramework's Jenkins plugin which rely on this file to display the results.

As I have seen fixing the output.xml parsing is still an open issue so I am asking experts if there is any work around to get Jenkins still picking the data despite output.xml failure.

Any help much appreciated.

Thanks

nagara...@greytip.com

unread,
Dec 6, 2016, 9:25:14 AM12/6/16
to robotframework-users
Can you post the screen shot of the error

Yogesh Patil

unread,
Dec 6, 2016, 11:02:50 AM12/6/16
to robotframework-users
Hi
Here is the console ouput logs as seen on Jenkins, 

==============================================================================
Scripts                                                               | FAIL |
19 critical tests, 16 passed, 3 failed
19 tests total, 16 passed, 3 failed
==============================================================================
Output:  C:\Jenkins\workspace\TrioII Regression New\Test_Scripts\Trio\output.xml
[ ERROR ] Reading XML source 'C:\Jenkins\workspace\TrioII Regression New\Test_Scripts\Trio\output.xml' failed: ParseError: mismatched tag: line 6096, column 2

Try --help for usage information.
Build step 'Execute Windows batch command' marked build as failure
Robot results publisher started...
-Parsing output xml:
Failed!
java.io.IOException: remote file operation failed: C:\Jenkins\workspace\TrioII Regression New\Test_Scripts\Trio at hudson.remoting.Channel@5e82512c:TrioII regression: hudson.remoting.ProxyException: java.io.IOException: Parsing of output xml failed!
	at hudson.FilePath.act(FilePath.java:986)
	at hudson.FilePath.act(FilePath.java:968)
	at hudson.plugins.robot.RobotParser.parse(RobotParser.java:49)
	at hudson.plugins.robot.RobotPublisher.parse(RobotPublisher.java:217)
	at hudson.plugins.robot.RobotPublisher.perform(RobotPublisher.java:239)
	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
	at hudson.model.Build$BuildExecution.post2(Build.java:185)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
	at hudson.model.Run.execute(Run.java:1763)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.remoting.ProxyException: java.io.IOException: Parsing of output xml failed!
	at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:103)
	at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:54)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
	at hudson.remoting.UserRequest.perform(UserRequest.java:120)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:326)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at hudson.remoting.Engine$1$1.run(Engine.java:62)
	at java.lang.Thread.run(Unknown Source)
	at ......remote call to TrioII regression(Native Method)
	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
	at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
	at hudson.remoting.Channel.call(Channel.java:781)
	at hudson.FilePath.act(FilePath.java:979)
	... 14 more
Caused by: hudson.remoting.ProxyException: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </test>; expected </kw>.
 at [row,col {unknown-source}]: [6096,6]
	at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:630)
	at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461)
	at com.ctc.wstx.sr.BasicStreamReader.reportWrongEndElem(BasicStreamReader.java:3258)
	at com.ctc.wstx.sr.BasicStreamReader.readEndElem(BasicStreamReader.java:3200)
	at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2832)
	at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
	at hudson.plugins.robot.RobotParser$RobotParserCallable.ignoreUntilStarts(RobotParser.java:199)
	at hudson.plugins.robot.RobotParser$RobotParserCallable.processTest(RobotParser.java:267)
	at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:148)
	at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:146)
	at hudson.plugins.robot.RobotParser$RobotParserCallable.parseResult(RobotParser.java:122)
	at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:98)
	at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:54)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
	at hudson.remoting.UserRequest.perform(UserRequest.java:120)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:326)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at hudson.remoting.Engine$1$1.run(Engine.java:62)
	at java.lang.Thread.run(Unknown Source)
Sending e-mails to: xyz
Finished: FAILURE


Pekka Klärck

unread,
Dec 6, 2016, 2:06:56 PM12/6/16
to hi.yoge...@gmail.com, robotframework-users
Hi,

It seems your output.xml is broken for some reason. This could
happend, for example, if your libraries use threads and utilize some
of Robot's internal APIs, but there are also many other ways to
corrupt output files. Unfortunately it isn't generally possible for
others to help much unless you can create a simple example that
demonstrates the problem.

Cheers,
.peke

2016-12-06 18:02 GMT+02:00 'Yogesh Patil' via robotframework-users
<robotframe...@googlegroups.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "robotframework-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to robotframework-u...@googlegroups.com.
> To post to this group, send email to robotframe...@googlegroups.com.
> Visit this group at https://groups.google.com/group/robotframework-users.
> For more options, visit https://groups.google.com/d/optout.



--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

Yogesh Patil

unread,
Dec 7, 2016, 12:29:53 PM12/7/16
to robotframework-users, hi.yoge...@gmail.com
Thanks Pekka for the response.
I am using threads in the architecture and will try to gracefully close the threads and see if that fixes the issue.

Many thanks

Paolo De Grazia

unread,
Dec 8, 2016, 5:50:14 AM12/8/16
to robotframework-users
Hi Yogesh,

I run RF tests on jenkins using a multithreaded script too.
When tests exceed the timeout, threads get killed and the RF output xml is broken, so, when combining all the outputs, I get the same error as you do.

I managed to solve this using the following library:


I have an example here:

Let me know if it works for you

Bye!
Reply all
Reply to author
Forward
0 new messages