Page 1 of 1

variables in commandline argument reportfile not resolved

Posted: Thu Jan 31, 2013 8:44 am
by andreas.tastler
Hello,

Variables in the commandline argument reportfile will not be resolved in Ranorex 4.0.1.
example: %S_%Y%M%D_%T.rxlog

Best Regards
Andreas

Re: variables in commandline argument reportfile not resolved

Posted: Thu Jan 31, 2013 11:35 am
by Support Team
Hello Andreas,

I checked the argument and in my case it worked as expected, could you please check if the following command works on your machine: "C:\...\bin\Debug>YourExe.exe /rf:C:\Test\%S_%Y_%T.rxlog"?
Could you please also test it with the new Ranorex version, here is the link: Ranorex 4.0.2 and please use the setup.exe for the installation.

Thanks,
Markus

Re: variables in commandline argument reportfile not resolved

Posted: Thu Jan 31, 2013 12:14 pm
by andreas.tastler
Hello,

Seems to be a fixed bug of 4.0.1. It works with 4.0.2.

Best Regards
Andreas

Re: variables in commandline argument reportfile not resolved

Posted: Fri Feb 01, 2013 11:50 am
by Support Team
Hello,

You are welcome :-)

Regards,
Markus (T)

Re: variables in commandline argument reportfile not resolved

Posted: Fri May 09, 2014 1:08 pm
by odklizec
Hi,

I'm sorry to reopen this old post but it seems the same problem is still reproducible with compressed reports. Using below command line results with unresolved variables in output report file name:
/zr /zrf:c:\temp\%S_%Y%M%D_%T.rxzlog ends with %S_%Y%M%D_%T.rxzlog report name. Reproducible with Ranorex 5.0.2.

Re: variables in commandline argument reportfile not resolved

Posted: Mon May 12, 2014 3:42 pm
by Support Team
Hello odklizec,

Thank you for reporting this issue. I have already added the issue to our internal bug-tracking system. We apologize for any inconvenience this may cause.

Regards,
Robert

Re: variables in commandline argument reportfile not resolved

Posted: Mon May 18, 2015 2:50 pm
by odklizec
Hi,

Sorry for reopening this post one more time, but I guess the issue is not fixed yet? Or maybe it's broken again? ;)
After an attempt to use the below command line...

Code: Select all

C:\test\bin\test.exe /zr /zrf:C:\test\reports\%S_%Y%M%D_%T.rxzlog
the output report file name looks like this:

Code: Select all

YD_T.rxzlog
It seems the same now happens both with compressed and uncompressed report.
Reproducible with Ranorex 5.3.2.

Re: variables in commandline argument reportfile not resolved

Posted: Tue May 19, 2015 9:58 am
by Support Team
Hi odklizec,

Unfortunately, we are not able to reproduce the issue with Ranorex 5.3.2. The fix for this issue was included in Ranorex 5.2.X. May I ask you to provide further details?
  • • operating system
    • Did you start the console with admin privileges?
Thanks,
Robert

Re: variables in commandline argument reportfile not resolved

Posted: Tue May 19, 2015 10:19 am
by odklizec
Hi Robert,

OK, I found 100% reproducible steps (reproduced with Win7 Pro and Win Server 2012 R2). It seems it happens only if the command line is started from batch file! ;)

Just add the command line to *.bat or *.cmd file. I found no way to start the bat/cmd file with admin privileges, but it's possible to do so via new shortcut created for such bat/cmd. However, this did not help either.

Re: variables in commandline argument reportfile not resolved

Posted: Fri May 22, 2015 9:39 am
by Support Team
Hi odklizec,

Please ensure that you are escaping the '%' sign within your bat file.

E.g.:

Code: Select all

..\test.exe /zr/zrf:..\%%S_%%Y%%M%%D_%%T.rxzlog
:D

Regards,
Robert

Re: variables in commandline argument reportfile not resolved

Posted: Fri May 22, 2015 9:46 am
by odklizec
Ah, silly me ;) Sorry for false alarm! I'm always forgetting about escaping in batch files.

Re: variables in commandline argument reportfile not resolved

Posted: Tue May 26, 2015 8:56 am
by Support Team
Hello odklizec,

No problem, you're welcome. :)

Regards,
Robert