How to automate testing of two interacting applications

Best practices, code snippets for common functionality, examples, and guidelines.
jackson.delahunt
Posts: 19
Joined: Wed Sep 18, 2013 9:01 am

How to automate testing of two interacting applications

Post by jackson.delahunt » Wed Oct 02, 2013 1:52 am

Hi,

I have a client-server architecture system where files are shared between two (or more) devices. I want to test functionality such as sending a file from the server to the client. I can currently use Ranorex to check that a file has been sent from the server, but I have no way of checking if that file has been received on the client. I want to test things at the client such as whether or not a notification was received, if the file opened automatically, etc. How would I use Ranorex to implement this kind of testing? I would need two different machines (virtual or physical) to do the tests. Is this possible to do with Ranorex? I would need to have Ranorex waiting on the client for a period (say 2 minutes) while a file comes in. Also, the current test being run would need to be known to both the client and server machine. When the server starts test X, the client also needs to start test X, so that the results of the client can be matched with the results of the server to ensure the system is working.

Is there a way to use Ranorex to achieve such a design?

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: How to automate testing of two interacting applications

Post by Ciege » Thu Oct 03, 2013 7:43 pm

Not sure anything specifically is built in to Ranorex but it can be done. Since Ranorex uses the complete .NET framework you can write your own C# or VB.NET code to talk to each Ranorex client and achieve what you are looking for.

Another thought. Can you have your client AUT installed on the server also? That way you only need one installation of Ranorex and will be able to automate the complete test from a single machine.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

jackson.delahunt
Posts: 19
Joined: Wed Sep 18, 2013 9:01 am

Re: How to automate testing of two interacting applications

Post by jackson.delahunt » Thu Oct 03, 2013 11:54 pm

Hi Ciege,

Thanks for that. Unfortunately, they cannot be installed together due to design. That would have made my life much easier!

So, with your first solution, are you suggesting that it is possible to write a global controller that instructs each ranorex client. For example, the controller might tell each ranorex client to start test 1, then wait for feedback from each as to whether or not they have finished, and then once they both have finished, initiate test 2 on both clients?

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: How to automate testing of two interacting applications

Post by Ciege » Fri Oct 04, 2013 12:01 am

If you have the skills and time, you could write a controller...

You could also harness TCP to communicate directly between scripts.

A little less effort could be to have one script launch a second script on the second computer (something like PSEXEC could work here). You could then have the two scripts talk (sync) to each other.

Or simpler yet, you could have each script write to a text file somewhere. Have the second script wait for that text file before it continues, etc...

Lot's of different ways to skin this cat. Just depends on how elaborate, robust, easy, hard you want to make it.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

jackson.delahunt
Posts: 19
Joined: Wed Sep 18, 2013 9:01 am

Re: How to automate testing of two interacting applications

Post by jackson.delahunt » Fri Oct 04, 2013 12:19 am

Hmm, the message passing system with the file sounds doable. Simple, but effective. Thanks for the tips! Where would I integrate my 'application programming' level code? I thought I might put it in the usercode section of the rxtst, but I see that one doesn't exist!

swmatisa
Posts: 123
Joined: Fri Aug 05, 2011 7:52 am

Re: How to automate testing of two interacting applications

Post by swmatisa » Mon Oct 07, 2013 8:33 am

Hello,

To do quite the same and simple 8) :
I run my client application on the same computer as the server application or I use a ftp client to check that the file has been correctly received.

Hope this help
SW