Get RanorexStudio Server name in remote execution

Ask general questions here.
Ajitpatil3011
Posts: 37
Joined: Thu Aug 22, 2019 4:14 pm

Get RanorexStudio Server name in remote execution

Post by Ajitpatil3011 » Tue Feb 18, 2020 9:50 am

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.

User avatar
RobinHood42
Posts: 321
Joined: Fri Jan 09, 2015 3:24 pm

Re: Get RanorexStudio Server name in remote execution

Post by RobinHood42 » Wed Feb 19, 2020 9:34 am

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

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

Re: Get RanorexStudio Server name in remote execution

Post by odklizec » Wed Feb 19, 2020 10:07 am

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
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