Page 1 of 1

pass parameters to ranorex via command prompt

Posted: Tue Apr 11, 2017 3:12 pm
by ilyas
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?

Re: pass parameters to ranorex via command prompt

Posted: Wed Apr 12, 2017 7:25 am
by odklizec
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"

Re: pass parameters to ranorex via command prompt

Posted: Wed Apr 12, 2017 2:31 pm
by krstcs
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.