How can i set the path where my log files are stored while running the testcase in robot framework in pycharm?

120 Views Asked by At

The project structure is shown in the image.

enter image description here

when i run the test, robot framework by default is storing the output files at the folder shown by the white circle. But I desired folder where i need the output file to be stored is shown by the black circle. So, that I can keep my output files in each project folders separately.

So, any suggests what can i do here instead of setting the ${OUTPUT_DIR} inside the test setup ? Or how can i set that path from the testcase itself not from terminal?

As you can see in the image, I've already tried many ways to set that but its not working. I set the Suite variable ${OTUPUT_DIR} but its also not working. It is just setting the directory but the result are being stored at the folder with white circle.

1

There are 1 best solutions below

0
Sam Maksymyshyn On

The output folder location is controlled by options passed to the robot script that you use to start test execution.

From User Guide:

-d, --outputdir <dir>
    Defines where to create output files.

pay attention to -d option in the next example

python.exe -m robot -d c:\my_result -t Test1 C:\Users\NewProject

more details you could get in UserGuide 6.2.1 Command Line options for test execution