Module call from command line with parameters

Ranorex Studio, Spy, Recorder, and Driver.
alberto.segovia
Posts: 2
Joined: Thu Nov 14, 2013 3:21 pm

Module call from command line with parameters

Post by alberto.segovia » Tue Dec 10, 2013 10:40 am

Hello! Quick question :-)

I want to be able to run individual modules from the command line, having these modules one or more variables defined.

Can I give their values directly in the call? Something like what I wrote below (but I guess “/pa” works only for global parameters and not for this case)

Code: Select all

myproject.exe /mo:mymodule /pa:variable1=value1 /pa:variable2=value2
Thanks!
Last edited by Support Team on Fri Jan 17, 2014 8:52 am, edited 1 time in total.
Reason: Added "with parameters" to topic to make it more specific

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

Re: Module call from command line

Post by krstcs » Tue Dec 10, 2013 2:45 pm

Correct, "pa" is for global parameters.

You would need to use a global parameter in your test and pass it in with the /pa switch, that is the only way to do it using a command line argument.
Shortcuts usually aren't...

Mayra
Posts: 68
Joined: Mon Dec 16, 2013 5:27 am

Re: Module call from command line

Post by Mayra » Thu Jan 16, 2014 7:49 pm

I am trying to do the same as Alberto.
I want to understand the answer, so, there is no way to call the module with parameters?

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

Re: Module call from command line with parameters

Post by krstcs » Mon Jan 20, 2014 4:07 pm

You can call test CASES, but not individual modules.

Your best bet would be to create test cases for each module and use the /tcpa switch.

See the user guide here http://www.ranorex.com/support/user-gui ... html#c3022 for more information.
Shortcuts usually aren't...