cancel
Showing results for 
Search instead for 
Did you mean: 

Detaching events in remote tests

Highlighted
Occasional Contributor

Detaching events in remote tests

Is it possible to detach an event in a test running on a remote host?

More precisely: 

- I'm using OnNetVarChange event to trigger some event on slave project

- The event handler should be called only by master project

 

I ve added the command Event.EventName.DetachFromTestComplete() at beginning of slave routine, but apparently it does not prevent the event handler to be executed on the slave.

 

I'm using TestComplete v11.30 , Python script.

 

 

Best Regards, 

Giovanni

6 REPLIES 6
Highlighted
Occasional Contributor

Re: Detaching events in remote tests

I also have another issue:

 

I'm running this project on  two hosts (+ a master).  I'm getting the following error message:

 

Runtime Error

Failed to invoke an object. Reason: timeout expired.

 

The same error occurred on the two hosts, probably because they are not able to change two (different) NetworkSuite variables.

 

Could that be caused by the fact that I'm not able to detach the event handler in the hosts, and every time master or hosts modify a NetworkSuite vaiable the calback are called toghether?

 

Any suggestions?

 

Many thanks,

Giovanni 

 

 

Highlighted
Occasional Contributor

Re: Detaching events in remote tests

I've solved the Runtime Error by including all NetworkSuite variable assignments in critical sections.

 

I still don't manage to detach the EventHandler ... 

 

 

Regards, 

Giovanni

Highlighted
Valued Contributor

Re: Detaching events in remote tests

Hi,

not sure to figure it out.

if you call a routine by another one, just use a parameter for the master routine that is set to a default value for all the others routines.

if you call TestExecute, it's the same, but with a command-line parameter.

Mehdi

Highlighted
Occasional Contributor

Re: Detaching events in remote tests

Yes, finally I did like this.

Anyway the detach function seems not to work. So in the test running on the slaves I have a lot of call to this routine (doing nothing)

Highlighted
Community Manager

Re: Detaching events in remote tests

Hi Giovanni,

 

Could you please check if you see the same behavior in TestComplete 11.31? This is the latest product version where some issues could be fixed.

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Occasional Contributor

Re: Detaching events in remote tests

Dear Tanya, 

 

I will verify asap.

 

Best Regards,

G.E.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors