Robot Framework debug xml generation

Hi all,

I’m currently using robotframework-3.0.2 in the past we didn’t encounter any issues generating output.xml using the batch file below.

But after some recent commit in our application, the output.xml generated by robot became corrupted.

[ ERROR ] Reading XML source ‘output.xml’ failed: ParseError: XML document structures must start and end within the same entity.

We try to discuss it with out local developers, but they cannot pin point the issue unless we can provide a logs on which part of robot framework generates the corrupted xml.

Is there any way to generate a system log after robot framework execution, since the logs that shows in the console doesn’t shows any error, only the ParseError, since the output.xml that rebot.py trying to extract is not completed or corrupted.

Thank you,

Hi @jinjabureddo,

Welcome to the forum!

I had this error when something broke during test case execution so the xml output could not be finished properly.

You can do 2 things:

  • check the output.xml that had been generated. It is incomplete, but it should point to the test case or even keyword when it broke. Maybe it is the same keyword during every run
  • you can add -b console.log to your robot command. That generates an additional log file even with python stack traces in case of an error.

In my experience, this error is rare in test cases. In my experience, it rather occurs when environments crash (jenkins looses connection, system under test reboots etc.)

Regards,
Markus

1 Like

Thanks this is new to me, but fortunately the generated console.log didn’t give any info regarding my issue on output.xml

tho right now I find myself a clue that might causes the incomplete output.xml.

it seems that when closing the application either using the exit menu or Close Window regexp=.*, it generate an incomplete output.xml, could be related to System.exit of the application.