Setting parameters from Command Line not working

Ask general questions here.
stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Setting parameters from Command Line not working

Post by stapes » Mon Dec 14, 2015 12:31 pm

I have tried to use the following command to over ride the parameter settings in a Test Case. In this case, globalIosDevice is the parameter. The new value is Richard Pullin iPad:

Code: Select all

Test-365AgilePortal.exe /tc:TC-iOS-365Agile_TEST /tcpa:TC-iOS-365Agile_TEST:globalIosDevice=Richard Pullin iPad  /zr  /zrf:C:\Users\stephen.staple\Documents\Ranorex\Reports\IOS-Report.rxzlog
It did not work, but continued to use the default setting.

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

Re: Setting parameters from Command Line not working

Post by odklizec » Mon Dec 14, 2015 12:44 pm

Hi,

I would suggest to enclose the parameter value with double quotes...

Code: Select all

/tcpa:TC-iOS-365Agile_TEST:globalIosDevice="Richard Pullin iPad"
The problem is, that empty space in command line is considered to be a parameter separator! Hence your test is most probably confused by globalIosDevice=Richard.
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

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Setting parameters from Command Line not working

Post by stapes » Mon Dec 14, 2015 1:25 pm

Ah. That makes sense. Didn't work though!
Test-365AgilePortal.exe /tc:TC-iOS-365Agile_TEST /tcpa:TC-iOS-365Agile_TEST:globalIosDevice="Richard Pullin iPad" /zr /zrf:C:\Users\stephen.staple\Documents\Ranorex\Reports\IOS-Report.rxzlog

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Setting parameters from Command Line not working

Post by stapes » Tue Dec 15, 2015 12:45 pm

I found my problem - spaces again

This worked:

Code: Select all

Install_365AgilePortal.exe /tcpa:TestCase1:parProgram="%c%" /tcpa:TestCase1:parWorkingDirectory="%b%" /zr  /zrf:C:\Users\stephen.staple\Documents\Ranorex\Reports

\InstallPortal.rxzlog
There had to be no spaces in the phrase /tcpa:Testcase1:parProgram, and my variables %c% and %b% had to be enclosed in quotes to prevent them being truncated at the first space.

Seems odd, but it now works.