Input parameters are not passed in Remote Agent Test esecution

Ranorex Spy, Recorder, and Studio.
mafi
Posts: 17
Joined: Thu Mar 21, 2019 2:43 pm

Input parameters are not passed in Remote Agent Test esecution

Post by mafi » Thu Mar 21, 2019 2:58 pm

Hi All,
I tried to remotely execute a test suite on a remote agent.
The local machine is W10Pro with Ranorex 9.
The remote machine is W10Home with Remote agent installed.
Running test suite on local machine everything works fine.
Trying to run the same test suite on the remote machine, test fails because variables (like application path) do not get the assigned parameters.
The values to variables are passed by code.
I noticed that the "config.properties" file from which the code reads the parameters is not included in the build and cannot be found by built project.
In fact, coping back the deployed folder on the local machine, I have the same problem, due to the missing config.properties file.
How could I solve the issue?
What should I check out?

Attached you can find a log for your reference.
Thank you in advance for your support.
RnxRemAgVar_Log.PNG
RnxRemAgVar_Log.PNG (43.47 KiB) Viewed 288 times
Last edited by mafi on Fri Mar 22, 2019 3:59 pm, edited 1 time in total.

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

Re: Input parameters are not passed in Remote Agent Test esecution

Post by odklizec » Fri Mar 22, 2019 12:21 pm

Hi,

The config.properties is something you added to the project? Are you sure you marked this file as "included" and enabled "copy to output directory=always"?...
viewtopic.php?f=20&t=13413&p=52728#p52728
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

mafi
Posts: 17
Joined: Thu Mar 21, 2019 2:43 pm

Re: Input parameters are not passed in Remote Agent Test esecution

Post by mafi » Fri Mar 22, 2019 2:36 pm

Yes, the file has been added to the project and it is read at the beginning.
It works locally, but doesn't deploying the solution, because the file is not found.
I read that post and I had already tried to add it in the output dir, but the file (build.properties) and its location (Solution items) do not allow to access to properties and then there is no way to modify those parameters.
Even trying to move the file in other folders of the solution from Ranorex Studio UI, it cannot be moved at all.

McTurtle
Posts: 263
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: Input parameters are not passed in Remote Agent Test esecution

Post by McTurtle » Mon Mar 25, 2019 1:41 pm

Hello mafi,

If the "Copy to output" setting is set to "Always" and it is found when building locally but not found when building in your deployment process, then it is probably not committed to the source control system. Can you check if the file is in the remote repo?

Regards,
McTurtle

mafi
Posts: 17
Joined: Thu Mar 21, 2019 2:43 pm

Re: Input parameters are not passed in Remote Agent Test esecution

Post by mafi » Mon Mar 25, 2019 2:26 pm

Hi McTurtle,
thank you for your post.
f the "Copy to output" setting is set to "Always" and it is found when building locally but not found when building in your deployment process, then it is probably not committed to the source control system. Can you check if the file is in the remote repo?
Unfortunately I cannot find any repo file into remote folder. Should it be present with the same "rxrep" file extension?
probably not committed to the source control system
How can I check this?

User avatar
Stub
Posts: 272
Joined: Fri Jul 15, 2016 1:35 pm

Re: Input parameters are not passed in Remote Agent Test esecution

Post by Stub » Tue Mar 26, 2019 8:47 am

My repositories have a .rxrep and .rximg file pairing. There's also a RanorexStudio generated .cs file that goes along with them, which I also store in source control, along with the other two files - because our setup uses MSBuild to build the Ranorex solution; we don't use Remote Agent. Three files in all per repository for me here.

Checking what's in your source control will depend on what your source control system happens to be. How familiar with that are you?

mafi
Posts: 17
Joined: Thu Mar 21, 2019 2:43 pm

Re: Input parameters are not passed in Remote Agent Test esecution

Post by mafi » Tue Mar 26, 2019 12:49 pm

I solved the problem just moving the file from "Solution itmes" folder to Test case subfolder. In this way I have been able to access to the file properties and, setting "Build action = EmbeddedResource" and "Copy to output directory=Always", the deployed solution was able to find the reference and then the values.

So just moving the file in the right place, setting the right properties for it and properly addressing it in the code, there is no problem in remote agent running.

Sorry for disturbing and thank you for your support.