Problem debugging script
I've been setting up a series of test scripts for one of our applications, and the early stages have gone according to plan.
TestComplete 8 was installed on my main development PC, VB scripts written and debugged, and everything generally went smoothly. Debugging, including stopping at breakpoints and stepping through code, worked fine.
Once the scripts were largely complete I set up a machine that would be used for most of the actual testing (so my main work system wouldn't be tied up for 6 hours at a go!), installed TC8 to that, copied the test suite to it, and started the final script shakedown.
Initially that looked good - TC started, the scripts ran, and results were logged. Then I started trying to debug the scripts in TC, and discovered problems.
I'll cut to the chase, and describe the simplest system I've boiled the test environment down to while trying to sort this:
1) Created a new Test Suite and Project within it on the test PC.
2) Manually entered this script into it:
<font class="small">Code:</font><hr /><pre>
i = 1
i = i + 10
3) Set a breakpoint on the "i = 1" line.
4) Made sure debugging was enabled for TC, and that the "Highlight execution point" option was checked in Options::Engines::General
5) Right-clicked on the "Log.Error" line, and select "Run to cursor" from the context menu.
The result of this is that the script runs, but doesn't highlight the execution point, doesn't stop on the break point and doesn't stop on the "Run to" line. It just runs through to completion.
The "Aha!" message does get added to the log, but double-clicking that results in a "Cannot navigate to the script unit or keyword test that posted the message" dialog. The call stack entry for the line has a "Unavailable node" in the Unit Name column.
Earlier runs on the application tests were qualitatively identical - much longer logs, but none of their entries resolvable to lines in the scripts, and no execution point highlighting or stopping on breakpoints.
I've run out of things to try here, and any suggestions would be very welcome!
[Both PCs (development and test runner) are WinXP SP3 systems running under VMWare.]
Re: Problem debugging script
An update on this, for posterity and anyone else that runs into the same problem; after [cough] searching through online support I turned up this page:
Q.: TestComplete does not break the script running on breakpoints. How can I fix it?
While the test machine already satisfied most of the criteria on there, I hadn't installed the Microsoft Script Debugger.
Put that on, and voilą, working code tracing and breakpoints!