pass parameters to ranorex via command prompt

Ask general questions here.
ilyas
Posts: 1
Joined: Tue Apr 11, 2017 3:00 pm

pass parameters to ranorex via command prompt

Post by ilyas » Tue Apr 11, 2017 3:12 pm

Hi - I want to kick off ranorex via command prompt and also got a couple of parameters i want to pass to ranorex via command prompt. Any help please?

I can kick off testcases via command prompt but when i send parameters in command it doesn't pass on parameters to ranorex. Here's command line

C:\Ranorax\Automated Tests\Pre-production project\DemoRanorex\bin\Debug>AutomatedTests.exe /tc:CreateOrder /pa:Market="XX" /pa:Environment="XXXXX"


Even though I've created Market and Environment variables in Global Parameters but still not working. Any clue please?

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

Re: pass parameters to ranorex via command prompt

Post by odklizec » Wed Apr 12, 2017 7:25 am

Hi,

Are you sure that both Global Parameters are binded to correct recording variables? Eventually, try to create Test Case parameters (instead of Global params) and call your test like this:

Code: Select all

C:\Ranorax\Automated Tests\Pre-production project\DemoRanorex\bin\Debug>AutomatedTests.exe /tc:CreateOrder /tcpa:CreateOrder:Market="XX" /tcpa:CreateOrder:Environment="XXXXX"
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

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: pass parameters to ranorex via command prompt

Post by krstcs » Wed Apr 12, 2017 2:31 pm

Also, if you run a specific test case with the "/tc:" switch, it doesn't use the Global Parameters, so you either need to move the parameters to the test case and use the "/tcpa:" switch as Pavel suggested, or you need to run the whole suite.
Shortcuts usually aren't...