How to pass additional command line arguments when using the agent

Ask general questions here.
Krunch
Posts: 6
Joined: Tue May 24, 2022 5:17 pm

How to pass additional command line arguments when using the agent

Post by Krunch » Mon Feb 13, 2023 5:21 pm

Hello All,

Sorry if this is in the wrong section, I wasn't sure where to place it. Anyway, If I set a global parameter to "password" in a test suite, then using the agent to execute that test suite on a remote system, currently the agent executes the file using "REMOTEVM.exe" /zr /ts:"REMOTEVM.rxtst" /rc:"TestRun"

This is fine, but I want to change the global parameter value when this executes. How can I modify this to something like "REMOTEVM.exe" /zr /ts:"REMOTEVM.rxtst" /rc:"TestRun" /param:password=chgPassword

Is this something I have to add to the app.config file? This is the last step of a very large puzzle I am trying to solve. Please help and tell me it is possible.

Thank you,
Mark

IvanF
Posts: 151
Joined: Thu Aug 11, 2022 8:55 pm

Re: How to pass additional command line arguments when using the agent

Post by IvanF » Mon Feb 13, 2023 5:42 pm

Hi, the general documentation is at the bottom of this user guide section - https://www.ranorex.com/help/latest/ran ... execution/

These couple of threads seem to dive a bit deeper into potential problems:
pass-parameters-globally-through-cmd-t13532.html
pass-parameters-to-ranorex-via-command- ... 10755.html

Krunch
Posts: 6
Joined: Tue May 24, 2022 5:17 pm

Re: How to pass additional command line arguments when using the agent

Post by Krunch » Mon Feb 13, 2023 6:12 pm

Thanks Ivan, but your info is not what we are looking for. I made bold and larger exactly what we want.

If I set a global parameter to "password" in a test suite, then using the agent to execute that test suite on a remote system, currently the agent executes the file using "REMOTEVM.exe" /zr /ts:"REMOTEVM.rxtst" /rc:"TestRun"

We want to change the global parameter value when we execute a Test Suite from Ranorex Studio, on to a remote VM using the Ranorex Agent.

How can I modify the AGENT to execute something like "REMOTEVM.exe" /zr /ts:"REMOTEVM.rxtst" /rc:"TestRun" /param:password=chgPassword from Ranorex Studio. Not the command line.


Is this something I have to add to the app.config file? This is the last step of a very large puzzle I am trying to solve. Please help and tell me it is possible.

Krunch
Posts: 6
Joined: Tue May 24, 2022 5:17 pm

Re: How to pass additional command line arguments when using the agent

Post by Krunch » Mon Feb 13, 2023 8:49 pm

One workaround I came up with was to bypass running the remote agents through the Ranorex Studio UI. I opened a command line on my studio machine, navigated to the projects bin directory I want to execute on a remote system. Then I was able to pass the global parameters to the remote system. The command line string looks like this...

C:\Users\<my machine>\folder1\folder2\Ranorex\solutionDir\suiteDir\bin\Debug>"suiteDir.exe" /agent:RemoteVM /zr /ts:"suiteDir.rxtst" /rc:"TestRun" /param:username=userTest /param:password=passTest

This works for what we need. However is would be nice to add another line in the Studio UI Remotes section that passes arguments to a remote system. See image for reference. OR when running an agent the DEBUG argument gets appended to the executable command.
You do not have the required permissions to view the files attached to this post.

IvanF
Posts: 151
Joined: Thu Aug 11, 2022 8:55 pm

Re: How to pass additional command line arguments when using the agent

Post by IvanF » Mon Feb 13, 2023 9:09 pm

Ah, sorry, misunderstood the part that the agent is executed from the Remote Pad, not command line, in the opening question.

You are correct about the workaround, at the moment it's either command line all the way or UI all the way (manually switching the global parameter before execution), but not the mix. Feature requests like this are best submitted directly to the support team - https://www.ranorex.com/support-query/

Krunch
Posts: 6
Joined: Tue May 24, 2022 5:17 pm

Re: How to pass additional command line arguments when using the agent

Post by Krunch » Mon Feb 13, 2023 9:27 pm

Thanks Ivan. I submitted a support query for a feature enhancement.

-Mark