Reputation: 1869
What is the best way to scrape a Robot Framework log for grand total of all results in a multi-suite scenario? My console log shows multiple lines like these:
6 critical tests, 5 passed, 1 failed
7 tests total, 5 passed, 2 failed
...
11 critical tests, 10 passed, 1 failed
13 tests total, 10 passed, 3 failed
But it is very frustrating there is no grand totals. Seems like there should be a simple option to display this info, without writing custom code.
Upvotes: 1
Views: 300
Reputation: 386362
The generated xml file has grand totals toward the end, inside the tag <statistics>
:
<?xml version="1.0" encoding="UTF-8"?>
<robot generator="Robot 3.1.2 (Python 3.7.2 on darwin)" generated="20190821 09:19:40.217" rpa="false">
<suite id="s1" name="Hello" source="/private/tmp/hello.robot">
...
</suite>
<statistics>
<total>
<stat pass="1" fail="0">Critical Tests</stat>
<stat pass="1" fail="0">All Tests</stat>
</total>
<tag>
</tag>
<suite>
<stat pass="1" fail="0" id="s1" name="Hello">Hello</stat>
</suite>
</statistics>
<errors>
</errors>
</robot>
Upvotes: 2