Page 1 of 1

Get RanorexStudio Server name in remote execution

Posted: Tue Feb 18, 2020 9:50 am
by Ajitpatil3011
I wish to get the machine name where RanorexStudio is running. I am running some tests on the Remote machine using Ranorex Agents. When I try Environment.machinename then I get the RanorexAgent machine name. Is there any way to get the Server name where RanorexStudio is installed? and which is sending commands to the Ranorex agent.

Re: Get RanorexStudio Server name in remote execution

Posted: Wed Feb 19, 2020 9:34 am
by RobinHood42
Hi,

I'm afraid that this not possible. There's definitely no API to get the "hostname" from the test run on the agent machine.

Cheers,
Robin

Re: Get RanorexStudio Server name in remote execution

Posted: Wed Feb 19, 2020 10:07 am
by odklizec
Hi,

I think the easiest way is to pass the name of server, from which you run the test, via command line parameter. Just create a Global parameter in your test suite, e.g. called 'serverName'. Then simply send the server name to test suite (either filled manually or obtained via hostname command) using Ranorex command line:

Code: Select all

test.exe /a:"AgentName" /pa:serverName=NameOfServer