Is it possible to modify the Robot output directory from within a test?

5,061 views
Skip to first unread message

Rob Ots

unread,
Mar 19, 2013, 3:07:28 PM3/19/13
to robotframe...@googlegroups.com
When launching jybot/pybot the --outputdir (-d) option allows specifying where output files go. I would like to modify this path from within a test.
 
I've tried setting the global variable ${OUTPUTDIR} via jython/python from within a test, but this does not seem change where the output, log, and report files go.
 
Is there a way to do this from within a test?

Mikko Korpela

unread,
Mar 20, 2013, 3:37:44 AM3/20/13
to ots...@gmail.com, robotframework-users
To my best knowledge this is not possible.
Robot is writing output.xml to the output directory while tests are executing so it might be difficult to implement this even in the future RF releases.

Best Regards,
Mikko Korpela


2013/3/19 Rob Ots <ots...@gmail.com>
When launching jybot/pybot the --outputdir (-d) option allows specifying where output files go. I would like to modify this path from within a test.
 
I've tried setting the global variable ${OUTPUTDIR} via jython/python from within a test, but this does not seem change where the output, log, and report files go.
 
Is there a way to do this from within a test?

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Mikko Korpela

Rob Ots

unread,
Mar 20, 2013, 1:15:01 PM3/20/13
to robotframe...@googlegroups.com, ots...@gmail.com
Thanks for your reply Mikko. I thought that might be the case.
 
I was trying to modify the outputdir, at the very beginning of the test before any output was written, based on variables passed in on the command line. Ex. -d results -v Product:ABC -v BuildNumber:123 would result in the outputdir being changed from results/ to results/ABC/123/.
 
I've moved the variable parsing into my calling script so that the -d/--outputdir value gets set from the start ...

Avihay Eyal

unread,
Jul 22, 2013, 9:58:49 AM7/22/13
to robotframe...@googlegroups.com, ots...@gmail.com
Hi, I don't know if it's still relevant, buy maybe as an hack, you can copy at the end of the run, the files from the ${OUTPUTDIR} to your desired directory.
Reply all
Reply to author
Forward
0 new messages