Page 1 of 1

How to automate testing of two interacting applications

Posted: Wed Oct 02, 2013 1:52 am
by jackson.delahunt
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?

Re: How to automate testing of two interacting applications

Posted: Thu Oct 03, 2013 7:43 pm
by Ciege
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.

Re: How to automate testing of two interacting applications

Posted: Thu Oct 03, 2013 11:54 pm
by jackson.delahunt
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?

Re: How to automate testing of two interacting applications

Posted: Fri Oct 04, 2013 12:01 am
by Ciege
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.

Re: How to automate testing of two interacting applications

Posted: Fri Oct 04, 2013 12:19 am
by jackson.delahunt
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!

Re: How to automate testing of two interacting applications

Posted: Mon Oct 07, 2013 8:33 am
by swmatisa
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