Communication between the Studio and the Agent

Class library usage, coding and language questions.
eckeart2
Posts: 2
Joined: Thu Jan 12, 2017 1:32 pm

Communication between the Studio and the Agent

Post by eckeart2 » Thu Jan 12, 2017 1:42 pm

Hi everybody,

I am looking for some information about the communication between the Ranorex Studio and the Ranorex Agent. This communication seems to be based on JSON messages using the http protocol.

My requirement ist to integrate a continuous integration server with the Ranorex suite. The CI-server builds the executable of the Ranorex solution and after that it needs to be executed on a remote system using the Ranorex agent.

I tried to trace the communication between the Studio and the agent on port 8082. This was not successful. I can only see the network messages, when the agent is registered in the Studio, but not the following messages, in which the execution of the solution is triggered and the results of the executions are collected.

Does anybody has some technical details about the sent messages between Ranorex Studio and the Ranorex Agent?

Best regards

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

Re: Communication between the Studio and the Agent

Post by odklizec » Thu Jan 12, 2017 2:45 pm

Hi,

In my opinion, if you are going to use a CI server to build your tests, there is no need to use Ranorex remote functionality at all? You can simply run the tests on remote machines directly via CI server? Or am I missing something here? I mean, Ranorex remote functionality is a nice to have functionality for people/companies without CI solution. But once you already have a CI server, it's better to utilize its full capability, instead of somewhat limited Ranorex remote functionality. Just my opinion ;)

I would suggest you to read this blog about integrating Ranorex with any CI solution:
http://www.ranorex.com/blog/integrate-r ... n-process/
At the end of this blog, you can find links to individual articles describing integration with some industry standard CI solutions. Hope this helps?
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

eckeart2
Posts: 2
Joined: Thu Jan 12, 2017 1:32 pm

Re: Communication between the Studio and the Agent

Post by eckeart2 » Thu Jan 12, 2017 5:06 pm

Hi Pavel,

thanks for your reply. This doesn't work for us, beacause the application under test (AUT) requires, that the RanorexSolution.exe is executed directly on the system, where the AUT is located. So the problem cannot be solved on the CI server.

We need to perform the following steps by a script on the CI server:
1. Push the RanorexSolution.exe onto the system, where AUT is located.
2. Execute the RanorexSolution.exe.
3. Collect the results.

These steps are exactly the same, what the Ranorex Agent does on the remote system. That's the reason, why we want to reuse the Agent functionality. An alternative would be to program this on our own.

Best regards

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

Re: Communication between the Studio and the Agent

Post by odklizec » Fri Jan 13, 2017 8:24 am

Hi,

Of course, you should not start the test execution on CI server, that would be pointless! ;) You just need to add the machine (with installed AUT) to your continuous integration system as a "slave" machine and configure the CI job that the test.exe is built and started on that slave machine. This all can be done via proper CI server and CI job configuration.

As mentioned, Ranorex remote functionality is currently very basic and requires Ranorex Studio for remote test execution. There is no support for starting remote execution from external tools. And since you already have some kind of CI available, it's better to properly configure and use this system over Ranorex remote functionality (just add new "slave", and configure CI job to built and start your test on that slave).
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

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

Re: Communication between the Studio and the Agent

Post by krstcs » Fri Jan 13, 2017 2:51 pm

I agree with Pavel. You should add your remote system as a slave/agent in your CI system and use the CI system for remote testing. This is the best way to handle situations like this.
Shortcuts usually aren't...