Forum Discussion

xtrem_32xx's avatar
xtrem_32xx
New Contributor
13 years ago

distributed testing of Connected Applications

Hi ...

What is the best way to Test a "ping pong test"?.



The idea is:

i have 2 slaves(Slave1, Slave2) and 1 master (Master1).

on each slave there is an Application, which will send a message to the other slave onMessageReceive.

so:

/////

Slave1.onMessageReceive += SEND MSG BACK TO SLAVE 2 And Log To TC that msg received 

Slave2.onMessageReceive += SEND MSG BACK TO SLAVE 1 And Log To TC that msg received

/////



Slave1 --MSG--> Slave2

Slave2 --MSG--> Slave1

...

and so on.



now,

The master should start the 2 application on the slaves, and trigger the first send msg event.



my question is:

what is the best way to realise this kind of tests ?

also,

how would i tell the Slaves to log back to TC ?



at the moment i created a job which has 2 tasks which will start my applications, but they will only launch the applications on the slaves and then stop directly.

also, i don`t know how to log back to TC when an application receive a message ?

iam using VS2010 and C#



please check my TC Project.

thanks

1 Reply

  • AlexeyK's avatar
    AlexeyK
    SmartBear Alumni (Retired)

    Hi,


    To synchronize your projects, you can use synchpoints. You have to add a synchpoint to each project that will use it. See the Synchronizing Distributed Tests article on our site or the Synchronizing Projects - Overview topic in the TestComplete help.


    i don`t know how to log back to TC when an application receive a message ?


    As far as I know, there is no way to send a message from a slave project to the master's log. However, you can use a network suite variable and the OnNetVarChange event. Network suite variables are shared among the projects that participate in the distributed run. So, your slave project can save the needed text to a variable, and the master project will be able to access this new value. In order for the master project to get a notification on the change, create the OnNetVarChange event handler in it. It will be called every time the variable changes, so you will be able to post the value to the log.


    how would i tell the Slaves to log back to TC ?


    Open the master project and look at the task properties. There is a "Copy remote log" column that indicates how TestComplete handles remote logs after the test is over. As far as I can see from your project, in your case, the logs should be always copied.


    To view slave logs, open the master log and look at the Log Items tree. It is on the left of the log window. (See the attached image.)