sridhar
sridhar

Reputation: 31

How to get log file name and log directory in robot framework

How to get the robot generated log file name and log directory.

I want to write a post process script, which can process the output XML file generated by robot.

Upvotes: 2

Views: 7566

Answers (2)

Radhakrishna Pemmasani
Radhakrishna Pemmasani

Reputation: 766

${LOG FILE}

Gives you absolute path to the log file.

${SUITE SOURCE}

Gives you absolute path to the suite file.

${OUTPUT DIR}

Gives you absolute path to the output directory. http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.html?r=2.8.4#automatic-variables

Upvotes: 3

Bryan Oakley
Bryan Oakley

Reputation: 386020

The easiest thing is to tell robot where you want the file to be, then you don't have to figure it out. Use the output directory command line option --outputdir. Unless you tell it where to put the output files, they will go into the current working directory.

If neither one of those works, you can capture the output of robot, and the last three lines will tell you the location of the output.xml, log.html and report.html files.

Upvotes: 1

Related Questions