Forum Discussion

lucieneven's avatar
lucieneven
Contributor
15 years ago

How to see the script generated line by line during the recording

Hello,



I'm just wondering whether TestComplete can generate the script in the QTP line by line when recording? From what we see in QTP, the script was generated at the same time during the recording. For now in TestComplete, all the scripts will be generated in a bundle after stop the recording. Sometimes this feature can help user be aware the error in the script in time, without waiting until the end.



Maybe it's the same issue or not. When playing back the TestComplete script, QTP will notify the user which line of script has been run at that moment, as can be seen from enclosed 2011-12-01 11-01-14 AM.png. Personally i think it is also an userful feature.



Can we configure somewhere to get TestComplete do this? I checked the manual and no hint yet.



Thanks for your help!



Lucien

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    During recording, TestComplete does a lot of interpretive replacements using things like NameMapping, Aliases, adding variables, parsing out object names, etc...  All these kinds of things make it impossible for TestComplete to show you the resulting code as it is being recorded because that code is, itself, not finalized until after recording is complete.


  • Hi Lucien,



    I'm just wondering whether TestComplete can generate the script in the QTP line by line when recording? From what we see in QTP, the script was generated at the same time during the recording. For now in TestComplete, all the scripts will be generated in a bundle after stop the recording. Sometimes this feature can help user be aware the error in the script in time, without waiting until the end.


    Robert is right — there's a lot of processing and "polishing" going on behind the scenes that can only be done on complete recording of data and usually in several passes. This includes filtering of unneeded operations, merging multiple low-level operations into a single high-level operation, changing the operation target to make it more robust and so on. (You can get more information on this process by reading about smart recording and event analyzers in TestComplete SDK docs.)



    That said, we have a feature request to show the test being generated during recording, and I've added your vote to it. So thanks for the feedback!





    When playing back the TestComplete script, QTP will notify the user which line of script has been run at that moment, as can be seen from enclosed 2011-12-01 11-01-14 AM.png.

    ...

    Can we configure somewhere to get TestComplete do this?


    When you are debugging your test, e.g. when you stepping through it, TestComplete highlights the current line automatically.

    To have the current line highlighted during normal (non-debug) test runs, select the Highlight execution point option in Tools > Options > Engines > General.