GeneralEvents_OnTimeout doesn't execute
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does just OnTimeout work for you?
https://support.smartbear.com/testcomplete/docs/ver-12-6/reference/events/ontimeout.html
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No comments yet? I would think this would be an issue with anyone using Test Complete with command line.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The version of TC you are using is almost 3 years old. You might try moving to the latest version.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
