How to generate report.html for every testsuit( .robot file) in RoboTFramework?

1.7k views Asked by At

I,m using single pycharm project to run different test files for a particular website. ex -: I'm having robot files with test cases such as

loginTest.robot , purchasetest.robot , signinwith_facebook.robot

When I run the code for each robot file, the report files are being overridden.

How to generate a separate report file for each .robot file when the test file is running.

1

There are 1 answers

0
Lomomo On

Are you using robot command to execute? If yes, you can run with these arguments:

-d --outputdir dir    Where to create output files. The default is the
                      directory where tests are run from and the given path
                      is considered relative to that unless it is absolute.
-o --output file      XML output file. Given path, similarly as paths given
                      to --log, --report, --xunit, and --debugfile, is
                      relative to --outputdir unless given as an absolute
                      path. Other output files are created based on XML
                      output files after the test execution and XML outputs
                      can also be further processed with Rebot tool. Can be
                      disabled by giving a special value `NONE`.
                      Default: output.xml
-l --log file         HTML log file. Can be disabled by giving a special
                      value `NONE`. Default: log.html
                      Examples: `--log mylog.html`, `-l NONE`
-r --report file      HTML report file. Can be disabled with `NONE`
                      similarly as --log. Default: report.html

I suggest using -d argument. Indicate a different directory for each .robot file executing.

robot -d test1 test1.robot

BTW, why don't you execute them at the same time? You can see each log in one file.