Friday, August 31, 2018

Robot Framework merge output files and generate a new log and report file

 we can use rebot command to merge multiple output xml file and generate a new log and report files.


  1. for convenience, put all of output.xml file in to one folder, e.g C:\output_1.xml, C:\output_2.xml ...
  2. use command parameters:
    • --outputdir  :: this is for your final result located. 
    • --merge   :: this is for merging all output files. 
    • --output :: this is for the merged final output file 
    • -  :: this is for generating new log file
    • - :: this is for generating new report file
  3. final command should be like this
C:\>rebot --outputdir c:\result --merge --output final_output.xml, -l final_log.html -r final_report.html output_1.xml output_2.xml, output_3.xml


the final results file, final_output.xml, final_log.html and final_report.html will be generated in the folder c:\result.

Done!!!

3 comments:

  1. I have one concern here, we are giving manually file names to merge. What if we have more than 10-20 or may be 100...files.? is there any way to achieve same.
    I feel it needs more manual efforts to merge large number of files in this way if we are adding xml file names manually.

    What

    ReplyDelete
    Replies
    1. Then you have to add names manually even if it's 100 files

      Delete
  2. rebot --name RebotCombined *.xml

    ReplyDelete