Repository navigation
Description
Because robot scripts are not always stable, due to infrastructural problems, we use a script to perform failing tests with a maximum of 3 times. Until tests are run ok... or eventually fail.
This will generate several output.xml which are combined into a single output.xml (report.html and log.html) using rebot.
Until Robotframework v6.1.1 this was working fine. I started to use version 7.0 and used the option --legacyoutput with both robot and rebot.
When I combine MORE THEN one output,xl, rebot will fail:
`
rebot --legacyoutput --merge --outputdir --output output.xml firstoutput.xml secondoutput.xml
[ ERROR ] Unexpected error: AttributeError: 'NoneType' object has no attribute 'isoformat'
Traceback (most recent call last):
File "C:\Python311\Lib\site-packages\robot\utils\application.py", line 81, in _execute
rc = self.main(arguments, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\robot\rebot.py", line 340, in main
rc = ResultWriter(*datasources).write_results(settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\robot\reporting\resultwriter.py", line 57, in write_results
self._write_output(results.result, settings.output, settings.legacy_output)
File "C:\Python311\Lib\site-packages\robot\reporting\resultwriter.py", line 71, in _write_output
self._write('Output', result.save, path, legacy_output)
File "C:\Python311\Lib\site-packages\robot\reporting\resultwriter.py", line 84, in _write
writer(path, *args)
File "C:\Python311\Lib\site-packages\robot\result\executionresult.py", line 154, in save
self.visit(writer(target, rpa=self.rpa))
File "C:\Python311\Lib\site-packages\robot\result\executionresult.py", line 168, in visit
visitor.visit_result(self)
File "C:\Python311\Lib\site-packages\robot\result\visitor.py", line 44, in visit_result
result.suite.visit(self)
File "C:\Python311\Lib\site-packages\robot\model\testsuite.py", line 420, in visit
visitor.visit_suite(self)
File "C:\Python311\Lib\site-packages\robot\model\visitor.py", line 131, in visit_suite
suite.suites.visit(self)
File "C:\Python311\Lib\site-packages\robot\model\itemlist.py", line 102, in visit
item.visit(visitor) # type: ignore
^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\robot\model\testsuite.py", line 420, in visit
visitor.visit_suite(self)
File "C:\Python311\Lib\site-packages\robot\model\visitor.py", line 131, in visit_suite
suite.suites.visit(self)
File "C:\Python311\Lib\site-packages\robot\model\itemlist.py", line 102, in visit
item.visit(visitor) # type: ignore
^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\robot\model\testsuite.py", line 420, in visit
visitor.visit_suite(self)
File "C:\Python311\Lib\site-packages\robot\model\visitor.py", line 131, in visit_suite
suite.suites.visit(self)
File "C:\Python311\Lib\site-packages\robot\model\itemlist.py", line 102, in visit
item.visit(visitor) # type: ignore
^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\robot\model\testsuite.py", line 420, in visit
visitor.visit_suite(self)
File "C:\Python311\Lib\site-packages\robot\model\visitor.py", line 135, in visit_suite
self.end_suite(suite)
File "C:\Python311\Lib\site-packages\robot\output\xmllogger.py", line 375, in end_suite
self._write_status(suite)
File "C:\Python311\Lib\site-packages\robot\output\xmllogger.py", line 444, in _write_status
'starttime': self._datetime_to_timestamp(item.start_time),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\robot\output\xmllogger.py", line 432, in _datetime_to_timestamp
return dt.isoformat(' ', timespec='milliseconds').replace('-', '')
^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'isoformat'
`
Is it something I'm doing wrong ? I found it confusing that the documentation & release notes mention the option "--legacy-output", but both robot.exe --help and rebot --help, only have the option "--legacyoutput" (without -).
Activity
[-]Possible problem with rebot(robotframework 7.0) when more the 1 output.xml files are turned into a single report[/-][+]`--legacy-output` does not work with Rebot when combining or merging results[/+]pekkaklarck commentedon Jan 12, 2024
This is a bug with
--legacy-outputthat can be reproduced also if combining results without the--mergeoption. In these cases all suites don't have start and end times, and that is not handled correctly.This is pretty severe issue, but I don't think it requires an urgent bug fix release. I'd like to wait at least a week to see are there other issues that need to be fixed.
emakaay commentedon Jan 12, 2024
I agree an urgent bug fix is not required.
| would like to note that the option "--legacy-output" is not visible when running robot --help or rebot --help.
Then only the option --legacyoutput (without the dash) is visible. are both options available ? or is this a bug in the documentation ?
pekkaklarck commentedon Jan 12, 2024
--legacyoutput,--legacy-outputand also--LegacyOutputare all the same. These long options have been case-insensitive for a long time, and in RF 6.1 (#4547) we made them also hyphen-insensitive.[-]`--legacy-output` does not work with Rebot when combining or merging results[/-][+]`--legacy-output` does not work with Rebot when combining, merging or filtering results[/+]pekkaklarck commentedon Jan 31, 2024
The problem occurs also if filtering results like:
Fixed now and fix will be included in RF 7.0.1 that will be released in the near future.
Fix --legacy-output with Rebot if times are not set
alangefe commentedon Feb 20, 2024
@pekkaklarck , do you have a schedule as to when RF 7.0.1 will be released? I would like to use some of the RF 7 features, but cannot until the
--legacy-outputflag is working properly due to external tools outside of my control that have not been fixed to handle the new output format.amgads commentedon May 31, 2024
@pekkaklarck -- we have the same issue and would like to use 7.0.1 as the plugin issue is breaking our automation testing and results -- when is the release date.
pekkaklarck commentedon May 31, 2024
7.0.1 has been delayed due to my paternity leave, but I hope we get at leasya release candidate out this weekend or early next week.
amgads commentedon May 31, 2024
pekkaklarck commentedon Jun 1, 2024
Pre-releases are installed with pip but require the
--preoption. We just need to get the rc out first.amgads commentedon Jun 1, 2024
pekkaklarck commentedon Jun 4, 2024
RF 7.0.1 rc 1 with this fix has just been released. It would be great if you could test does the fix work properly before the final release that's targeted for Monday June 10.
emakaay commentedon Jun 4, 2024
amgads commentedon Jun 5, 2024
pekkaklarck commentedon Jun 7, 2024
Thanks for testing @amgads!