Ask a Question

GeneralEvents_OnTimeout doesn't execute

SOLVED
RonT
Occasional Contributor

GeneralEvents_OnTimeout doesn't execute

Test Complete 12.6

Web testing

100% VBScript

My suites are ALL built as ONE project per suite

We have no Admin access to our DoD systems

This version (12.6) is the only one on the install-able list.

 

I've started running all of our projects using command line parameters from scheduled Power Shell scripts.

 

The .ps1 scripts start Test Complete as follows:

$process = Start-Process -Wait -PassThru -filepath `"$global:tcpath`" -ArgumentList `"$global:projpath$global:app`", $global:timeout, $global:indexstart, $global:indexend, $global:indexstep, "/run", "/exit"

 

The parameters look (in general) like this:

     $global:tcpath = "C:\Program Files (x86)\SmartBear\TestComplete 12\x64\Bin\TestComplete.exe"
     $global:app = "PXC_QUES\PXC_QUES.pjs"

     $global:timeout = "/timeout:900" #15 minutes

     $global:indexstart = "STARTHERE=1"

     $global:indexend = "ENDHERE=4"
     $global:indexstep = "STEPHERE=1"

and when the project runs, it is compliant to the /timeout value, that is, if the test runs longer than 15 minutes, Test Complete will stop with a timeout error and return the appropriate return code of 4.

 

The issue is that GeneralEvents_OnTimeout never executes when the test times out.

 

Sub GeneralEvents_OnTimeout(Sender, Params)
  Call aqFile.WriteToTextFile(TCID_email, "----- GeneralEvent OnTimeout", aqFile.ctANSI, False)
  TerminateBrowsersIE11
End Sub

 

This means I don't terminate the browser, and this causes the Power Shell script to hang because the -Wait parameter is waiting for the child process (browser) to complete.

 

I have Stop on Error UNchecked (i've tries it both ways).

I have all my GeneralEvents in their own Unit_LIB_GeneralEvents file, and that unit is included ('USEUNIT) in every other unit, so it should be reachable.

 

I suspect I've missed something fundamental, but find no hints in previous posts, nor the "Handling Events TestComplete Documentation"

 

Additionally I've tried the following, and none of these execute either. I would expect OnStartTest to run when the test starts, but I never get the message in the email file from any of these.

 

Sub GeneralEvents_OnStartTest(Sender)
  Call aqFile.WriteToTextFile(TCID_email, "----- GeneralEvent OnStartTest", aqFile.ctANSI, False)
End Sub
Sub GeneralEvents_OnStopTest(Sender)
  Call aqFile.WriteToTextFile(TCID_email, "----- GeneralEvent OnStopTest", aqFile.ctANSI, False)
End Sub

Sub GeneralEvents_OnLogError(Sender)
  Call aqFile.WriteToTextFile(TCID_email, "----- GeneralEvent OnLogError", aqFile.ctANSI, False)
End Sub

 

Thanks in advance for any advice.

 

 

 

 

 

 

 

 

 

Test it until it breaks, then keep going!
1 ACCEPTED SOLUTION

Accepted Solutions
Marsha_R
Community Hero

Re: GeneralEvents_OnTimeout doesn't execute

Sorry you aren't able to keep up.  You can always contact Support and see if there's a bug fix that they are willing to port to an earlier version.

View solution in original post

6 REPLIES 6
Marsha_R
Community Hero

Re: GeneralEvents_OnTimeout doesn't execute

RonT
Occasional Contributor

Re: GeneralEvents_OnTimeout doesn't execute

I tried    Sub OnTimeout     just now, but it made no difference.

 

Even though the page you referenced, under Examples shows...

 

VBScript

Sub GeneralEvents_OnTimeout(Sender, Params)
  Runner.Stop
End Sub

 

...I was hoping you were on to something, but alas, no.

Test it until it breaks, then keep going!
RonT
Occasional Contributor

Re: GeneralEvents_OnTimeout doesn't execute

No comments yet? I would think this would be an issue with anyone using Test Complete with command line.

 

 

Test it until it breaks, then keep going!
Marsha_R
Community Hero

Re: GeneralEvents_OnTimeout doesn't execute

The version of TC you are using is almost 3 years old.  You might try moving to the latest version.

RonT
Occasional Contributor

Re: GeneralEvents_OnTimeout doesn't execute

Sorry, forgot to add this to the header.

 

We have no Admin access to our DoD systems

This version (12.6) is the only one on the install-able list.

 

So sorry, we can't yet upgrade. Perhaps in a year or two.

 

Regardless of the fact it's a few years old, this functionality should exist, and should work, correct?

 

 

Test it until it breaks, then keep going!
Marsha_R
Community Hero

Re: GeneralEvents_OnTimeout doesn't execute

Sorry you aren't able to keep up.  You can always contact Support and see if there's a bug fix that they are willing to port to an earlier version.

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: