Report name switches don't work if test is run via .bat

Ask general questions here.
hporter
Posts: 35
Joined: Wed Jan 23, 2013 4:49 pm

Report name switches don't work if test is run via .bat

Post by hporter » Fri Jun 07, 2013 3:37 pm

I have a batch file that kicks off my test with the following command:

"C:\HP RX tests\RelEng_Build\RelEng_Build\bin\Debug\RelEng_Build.exe" /pa:farm=cpbuild2013 /rf:"C:\HP RX tests\RelEng_Build\RelEng_Build\bin\Debug\%S_%Y%M%D_%T.rxlog"

However, when the report file is actually created, it shows up as "YD_T.rxlog". How can I properly pass in these params to my command-line? Thanks!

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3945
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Report name switches don't work if test is run via .bat

Post by odklizec » Fri Jun 07, 2013 4:29 pm

Hi,

Do you use the latest RX version? It works fine for me in 4.0.4. I believe there was such a problem in RX 4.0.1, but it should be fixed since 4.0.2.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

hporter
Posts: 35
Joined: Wed Jan 23, 2013 4:49 pm

Re: Report name switches don't work if test is run via .bat

Post by hporter » Fri Jun 07, 2013 5:19 pm

Thanks for the quick reply. That occurred to me as well...in fact, I think there was a forum post I came across that said as much. I did update to 4.0.4 (I believe I was on 4.0.1), but it seems the issue still persists for me.

hporter
Posts: 35
Joined: Wed Jan 23, 2013 4:49 pm

Re: Report name switches don't work if test is run via .bat

Post by hporter » Fri Jun 07, 2013 5:45 pm

I've figured it out - apparently the '%' is a special character in .bat files. You have to double up every occurrence of it to circumvent that. Once I did that, it worked fine. Thanks again!

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3945
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Report name switches don't work if test is run via .bat

Post by odklizec » Mon Jun 10, 2013 9:43 am

Good you find the solution! I somehow ignored the fact you are trying to run the command from the batch file and not just from the command line ;) It seems it's required to use doubled percent string in batch.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration