Description
When we use RobotFramework.main
to execute test suites, we get a output.xml
result file, then we use RobotFramework.main
and the output.xml
to rerun the failed cases in the same process, we get the second result file, naming it output_rerun.xml
. After that, we use rebot
api to merge the output.xml
and output_rerun.xml
to one result file, naming output_all.xml
. We find that output_all.xml
just contains the execution result of the failed cases.
So we checked the source code of robotframework, and we found the error code in robot/conf/settings.py:83
We found that code will change the default value of the items of _BaseSettings._cli_opts.
The root cause of this issue is self['TestNames']
and _BaseSettings._cli_opts['TestNames'][1]
reference the same list, when execute self['TestNames'] += self['ReRunFailed']
, equal to change the value of _BaseSettings._cli_opts['TestNames'][1]