-1

I am using robot framework with pycharm. I am running all the tests of my folder using

testfolder>robot .

I want to set the path of log/output/report file to my customized location. I have change the path of screenshot as D:/Screenshot folder in my variables.robot. But How to set the path for mentioned file? I also wanted to know What is the common to run on terminal/cmd to run all the scripts of same folder with defined log file path?

Amaze_Rock
  • 163
  • 3
  • 16

2 Answers2

0

Robot Framework User Guide walks you through the Basic Usage in quite good detail. Additionally the same document contains a section for the Different Command Line Options Available where you can get quite good picture on the options you have available.

Specifically --outputdir or -d will make Robot to save Log.html, Report.html and output.xml to the specified folder.

Morkkis
  • 450
  • 3
  • 12
0

As mentioned by @Morkkis, the -d or --outputdir would do the trick. Also, it works for both command line and PyCharm Arguments field

For the screenshots, you could use the screenshot_directory command line argument. Please, check the Keyworkd documentation for more details ScreenShot Library Documentation

Also, for the report/logs file location, you can use these variables:

  • ${LOG LEVEL} Current log level.
  • ${OUTPUT FILE} An absolute path to the output file.
  • ${LOG FILE} An absolute path to the log file or string NONE when no log file is created.
  • ${REPORT FILE} An absolute path to the report file or string NONE when no report is created.
  • ${DEBUG FILE} An absolute path to the debug file or string NONE when no debug file is created.
  • ${OUTPUT DIR} An absolute path to the output directory.
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Brito
  • 67
  • 1
  • 14