Change name output and report

I tried to change the name of output and report files with a variable global and ride that the user write but y tried this and the name is ${name_test_user}.

Hi Adrian,

  • Which application is this screenshot from?
  • does it support this variable syntax?

${name_test_user} is not a valid variable on either the windows or *nix (MacOS or Linux) command lines, so if the application you’re using just passes this value through to robot’s command line you would probably end up file called ${name_test_user} if it worked at all.

I’m not aware of robot framework being able to evaluate these variables before the file is written, with the --output this is especially unlikely as the file is probably opened for writing before the first line of the robot file is even processed.

I hope that helps?


Hi dave, the screenshot is from RIDE in the ‘run’ tab

Hi Adrian,

OK I don’t use RIDE myself but one of the maintainers of RIDE (@HelioGuilherme66) frequents this forum so he should be able to help you soon.


Like @damies13 mentioned, you have to use variables defined at operating system level.
If you have Windows, you can use: %USERNAME%
On other good operating systems you can use: $USER

The Arguments field in RIDE is just the same as you would use in a command window/shell/terminal.


I’ve tried this %USERNAME% but as you can see it still doesn’t work. The variable is defined in a test case and then set as global.



You did not read right what I wrote:
It must use the syntax for the operating system, exactly as I wrote.
And the arguments to robot are passed before knowing anything from the test case.
Even if you define a variable to be in environment from inside the test case, it cannot be used in the arguments for robot because they were already processed.
You can do that for another subsequent test case run.

1 Like

Ok thanks.