Reduce the size of output.xml

2,700 views
Skip to first unread message

Laurent Bristiel

unread,
Dec 19, 2013, 4:47:48 AM12/19/13
to robotframe...@googlegroups.com
Hello everyone,

I am trying to reduce the size of Robot output files (output.xml, report.html and log.html)
I have been testing the "remove and flatten keywords" options and they are quite efficient and convenient,
but they have impact only on the log.html and my main issue currently is with the output.xlm
Is there a way to reduce the size of the XML file?

To give a little bit more context, my problem is the following:
- Robot tests are launched by Jenkins and I use the Jenkins Plugin
- For each build of Robot in Jenkins, Jenkins plugin stores the output files (the 3)
    Here is what I get:
        log.html => 800 KB
        output.xml => 40 MB
        report.html => 400 KB
    As you can see the output.xml is quite big
- I want to keep an history of my builds and typically I have the 100 last ones
    => so I end up having 4 Go for this Jenkins job and I have several like this one
- and as far as I understand, the plugin need the XML file to display history and graph so I can not remove it.
    => hence I would like to reduce the level of details contained in the XML

If anyone has any idea...
Thanks,
Laurent Bristiel

Kevin O.

unread,
Dec 19, 2013, 1:29:04 PM12/19/13
to robotframe...@googlegroups.com
If you only need the history as shown through the Jenkins plugin, then I think you can delete output.xml.
The plugin extracts necessary information and stores it in the build folder in a file called robot_results.xml, which is quite small relatively.
I am not 100% on this, but I deleted the output.xml file and it seems to be fine without it.

Laurent Bristiel

unread,
Dec 20, 2013, 12:27:18 AM12/20/13
to robotframe...@googlegroups.com
Oh, that would be great indeed if I could remove altogether output.xml file once the jenkins plugin has published it (i.e. copied to its one XML file).
I will try that.
Thanks,
Laurent

Pekka Klärck

unread,
Dec 20, 2013, 2:19:49 PM12/20/13
to Laurent Bristiel, robotframework-users
2013/12/19 Laurent Bristiel <lau...@bristiel.com>:
>
> I am trying to reduce the size of Robot output files (output.xml,
> report.html and log.html)
> I have been testing the "remove and flatten keywords" options and they are
> quite efficient and convenient,
> but they have impact only on the log.html and my main issue currently is
> with the output.xlm
> Is there a way to reduce the size of the XML file?

The same --RemoveKeywords and --FlattenKeywords options work also with
Rebot and it allows you to create a new output file. For example:

rebot --RemoveKeywords passed --output small.xml original.xml

You should also be able to overwrite the original if you don't want to keep it.

Another possibility to reduce the size is zipping.

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

Laurent Bristiel

unread,
Jan 8, 2014, 10:31:11 AM1/8/14
to robotframe...@googlegroups.com, Laurent Bristiel
> rebot --RemoveKeywords passed --output small.xml original.xml
Tried that and it works great for me.
In Jenkins, after my pybot action, I added this rebot action to reduce the size of all the output files (including the output.xml)
Then the robot-jenkins plugin copy the 3 (small) files to jenkins and has all the needed information to build graph and stats.
Excellent.

Thanks,
Laurent

Janne Piironen

unread,
Feb 10, 2014, 3:54:38 AM2/10/14
to robotframe...@googlegroups.com
Hi!

As you suspected the output.xml is not needed by Jenkins after the publishing step of the build is finished. The plugin stores all the data it needs in a separate xml file and the original output.xml is merely archived for traceability or reuse in some other context.

It would probably be a good improvement to make the archiving of output.xml optional, since in many cases it is not used and it might use a lot of disk space.

BR,
-Janne

Laurent Bristiel

unread,
Feb 10, 2014, 4:25:26 AM2/10/14
to robotframe...@googlegroups.com
Thanks for your answer Janne.
I created an improvement request in Jenkins Jira:
https://issues.jenkins-ci.org/browse/JENKINS-21736

I am available to test it once available,
Would be very useful for me,
Laurent

PS: For information, the other option of doing a rebot on the output.xml before the plugin is called works but has 2 drawbacks: 1) the rebot is a bit long because my output.xml file is quite big 2) I still end up with a 4Mo output.xml archived for every single job in Jenkins server.

Artur G.

unread,
Mar 26, 2014, 8:47:51 AM3/26/14
to robotframe...@googlegroups.com
Hi Laurent,

I have a short question - do you see "Duration trend" when output.xml is not stored anymore?
I can see duration time for a single test suite/case, but overall time that was visible under "Suite execution took:" is missing.

Artur

Laurent Bristiel

unread,
Mar 26, 2014, 4:14:45 PM3/26/14
to gur...@gmail.com, robotframe...@googlegroups.com
Yes, I still see it.
You mean when I am the "Robot Result" page with the failed tests, pass/failed trend, duration trend, and all test suite, right?

--
You received this message because you are subscribed to a topic in the Google Groups "robotframework-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/robotframework-users/2pr6MmhmoKc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

Janne Piironen

unread,
Mar 26, 2014, 5:32:51 PM3/26/14
to robotframe...@googlegroups.com, gur...@gmail.com
Hi Artur,

Whether or not the output.xml is present shouldn't affect the display of duration graph in any ways. The plugin will never read the output.xml again after the build is done.

However, you might have stumbled to some other issue since there was an update on how the execution times are parsed in 1.4.2 release. What I gathered from your message you mean that it's only missing on the "main" result page but visible when you dig down into suites and cases?

-Janne
To unsubscribe from this group and all its topics, send an email to robotframework-users+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages