Synchronizing tests on different machines

Best practices, code snippets for common functionality, examples, and guidelines.
C_Schuh
Posts: 6
Joined: Thu Oct 29, 2020 12:04 pm

Synchronizing tests on different machines

Post by C_Schuh » Fri Nov 27, 2020 3:25 pm

Hello,

I‘m just working on a test scenario I am trying to automize.

It is a system with different clients, where users work together collaboratively.

Scenario goes the following:

Step 1: User A on workplace A takes over a task and opens up an issue. Then he decides to delegate this issue to User B on workplace B and forwards it with the implemented functionality.
Step 2: User B picks it up and works on it. Then User B decides to give it back to User A and uses the backwarding functionality.
Step 3: User A takes it back, finishes it, and closes the issue.

Focus of the testing should be on the Forwarding/Backwarding-functionality.

How can I synchronize the test runs on two different machines? Like when the test run on machine A is finished or halted, then the test run on machine B is triggered, then machine B is done and machine A completes its test run.

Is using the Ranorex Agent helpful and how would I use it?

Or do you recommend a different practice?

Thanks a lot!
Chris

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

Re: Synchronizing tests on different machines

Post by odklizec » Fri Nov 27, 2020 4:14 pm

Hi,

I’m afraid, there is not an easy approach to this problem. The only thing you can probably do is to sequentially run two tests at two computers, where first one sets something in UI and pauses its execution until there appears result from second computer. And second test on second computer should set UI to the state before there are finished steps from first computer. In both cases, you should rely on Wait For Exists/NotExists action and you will eventually have to use some kind of for...next or do...while loop, which means code will be involved. And I’m afraid, there will be delivered two reports. In other words, there is no out-of-the-box solution for test synchronisation in Ranorex.
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

C_Schuh
Posts: 6
Joined: Thu Oct 29, 2020 12:04 pm

Re: Synchronizing tests on different machines

Post by C_Schuh » Sat Nov 28, 2020 3:52 pm

Thanks,

That's what I have thought, using "Wait for". I hope, that procedure is robust enough to deliver reproducable, reliable results.

That with different reports isn't that crucial. If the one on machine A delivers "success" it will probably have worked on the other machine, too.

Best regards.

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

Re: Synchronizing tests on different machines

Post by odklizec » Sat Nov 28, 2020 4:25 pm

Hi,

Wait For is definitely stable. I’m using it in all my tests instead of hardcoded delays and I’ve never experienced an issue with this function. Good luck with your test! 😉
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