Forum Discussion

jarnold615's avatar
jarnold615
Occasional Contributor
14 years ago

TC 7.5 slows to crawl after reaching particular subroutine in VBScript

Whenever I try to run the following script against the Delphi rich-client application that I test, TC always slows to a crawl when it gets to the "EditWorkRuleMinContin" subroutine.  It takes about 15 seconds just to enter a single character in a text field.  All I'm doing is adding an item in a grid, then editing it and repeating this eight more times.  I haven't encountered this problem anywhere else.  Has this kind of problem ever been reported?  I'm running Win7 Pro.




Sub WorkRuleDef


WorkRuleDef

Call OpenModule("Work Rules")


Call AddWorkRule("Work Rule 1", "WR Desc", "Minimum Time in Window")


Call EditWorkRuleMinTimeWin("Work Rule 1", "WorkSuperstate", "2:00", "fiscal", 5, "YEARLY")


Call AddWorkRule("Work Rule 2", "WR Desc", "Maximum Time in Window")


Call EditWorkRuleMaxTimeWin("Work Rule 2", "WorkSuperstate", "2:00", "fiscal", 5, "YEARLY")


Call AddWorkRule("Work Rule 3", "WR Desc", "Minimum Schedule in Window")


Call EditWorkRuleMinSchedWin("Work Rule 3", "new name", "5", "moving", 30, "YEARLY")


Call AddWorkRule("Work Rule 4", "WR Desc", "Maximum Schedule in Window")


Call EditWorkRuleMaxSchedWin("Work Rule 4", "new name", "5", "moving", 30, "YEARLY")


Call AddWorkRule("Work Rule 5", "WR Desc", "Minimum Consecutive Schedule")


Call EditWorkRuleMinConsecSched("Work Rule 5", "new name", 5, "True")


Call AddWorkRule("Work Rule 6", "WR Desc", "Maximum Consecutive Schedule")


Call EditWorkRuleMaxConsecSched("Work Rule 6", "new name", 5, "True")


Call AddWorkRule("Work Rule 7", "WR Desc", "Minimum Time after Schedule")


Call EditWorkRuleMinTimeAfterSched("Work Rule 7", "new name", 5, "nrmpay", "24:00")


Call AddWorkRule("Work Rule 8", "WR Desc", "Minimum Continuous Time Off")


 


'at beginning of next subroutine, TC slows to a crawl:


Call EditWorkRuleMinContin("Work Rule 8", "nrmpay", "24:00", "fiscal", "48:00", "YEARLY")


Call AddWorkRule("Work Rule 9", "WR Desc", "Conditional Schedule")


Call EditWorkRuleCondSched("Work Rule 9", "new name", 2, "false", "new name", 3, "true", "true", "true")


Call EditWorkRuleGeneral("Work Rule 9", "new name", "new desc")


Call DupWorkRule("Work Rule 8", "dup name", "dup desc")



End sub



  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi John,


    As far as I see, all of these dumps are generated for TestComplete. Could you please generate the dumps for your application? For this purpose, you need to specify the application's executable in the command-line window for Debugging Tools for Windows (as I described in one of my previous posts).


    These dumps will be very helpful for us and will allow us to find the reason of the problem faster.


    One more note: please clarify in detail what the tested application is doing when TestComplete freezes? Thank you.

  • jarnold615's avatar
    jarnold615
    Occasional Contributor
    I attempted to connect to our application using the Windows debugger program.  I'm not sure if the output I've attached is helpful or not but it may provide some clues.  One of our developers has looked at this and thinks the problem is specifically with keystrokes being sent very slowly.  Other commands are processed normally. 
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi John,


    There are no dumps in the attached archive. If you failed to generate the dumps using the Debugging Tools for Windows utility, please try following the steps below:


    1. Download AQtime Standard, which is our free profiling tool, from our web site:

    AQtime Standard


    2. Install the tool.


    3. Start AQtime with the -NotOpenApp command-line argument. For example, you can use the following command line:

    "c:\Program Files\SmartBear\AQtime 7\Bin\AQtime.exe" -NotOpenApp


    4. Select the 'File | Open...' main menu item.


    5. In the Open File dialog, select the executable file of the tested application and click Open.


    6. Take a look at the AQtime toolbar - there is a combo box. Open it and select the "Tracing | Exception Trace Profiler" item.


    7. Select the "Options | Options..." main menu command - the Options dialog will appear.


    8. Enable the "Profiling Time | Event View | Debug Events | Generate dump on exception" option and specify a dump folder.


    9. Set the "Profiling Time | Event View | General | Exceptions | Depth shown" setting to 100 and click OK.


    10 Click the Run toolbar button (the green arrow) or press F5 to start the profiling.


    11. AQtime will start the tested application and generate dump files for all exceptions that will occur in the application until it is closed.


    12. Reproduce the problem.


    13. After the problem occurs, right-click somewhere within the Event View panel (it is opened by default at the bottom of AQtime's window) and select the 'Save All...' item.


    14. Save the panel's contents to an HTML file and send us the file along with all of the generated dump files via our Contact Support form.


    Thanks in advance.

  • jarnold615's avatar
    jarnold615
    Occasional Contributor
    I was able to use the AQtime tool to capture an error that occurred while running my script.  However, the error is occurring at a different point in the script when I'm using the AQtime tool.  The script froze (not just slowed down) while executing the EditWorkRuleMaxSchedWin routine.  I've attached several dump files that were generated by the tool.
  • jarnold615's avatar
    jarnold615
    Occasional Contributor
    Here's a better example where the exception occurred during the EditWorkRuleMinSchedWin routine.  The HTML and dump files are attached.



    John
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi John,


    The dumps for TestComplete that you posted here earlier indicate that the problem is in your application (it slows down significantly). That's why, we really need to get the dumps (generated by the Debugging Tools for Windows utility) captured for the tested application. I'm really sorry that you had to generate additional dumps with AQtime, but these dumps are of no help.


    So, please generate the dumps for the application with the Debugging Tools for Windows utility as I've mentioned in one of my previous posts and post them here. As for the fact that you failed to connect to the application using this utility, I recommend that you try to connect to it before the application freezes.


    Also, I need to ask you once again to describe in detail what the tested application is doing when TestComplete freezes.


    Thanks.

  • jarnold615's avatar
    jarnold615
    Occasional Contributor
    I believe these four dump files should contain what you're looking for.  The first two were taken before reproducing the defect.  The second two were taken right after and 30 seconds after reproducing the defect.  What happens right before the defect occurs is this:



    1. A "work rule" object is created, which contains a name, description and a button to further configure the object.

    2. The Find dialog is displayed to locate the object created in step 1 in the grid. 

    3. TestComplete begins to execute the line "Call Scope.SetFocus" in the script but suddenly slows down so that it's only sending one character every 15 seconds or so.  If I stop the test execution, a message appears in the log saying "window cannot get focus."  I've tried removing the SetFocus line but then the script will get hung up on the next line which is: Call Scope.keys("Name").



    John
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi John,


    Unfortunately, the dumps didn't provide any additional information about the cause of this behavior.


    I've consulted with our developers, and below, there are several of their suggestions:


    1. Try to reproduce the behavior with the latest version of TestComplete (ver. 8.60). If you have no license for this version, you can download a trial from our web site.


    2. If the problem remains, try turning off all the Open Application extensions. For this purpose, select File | Install Extension from TestComplete's main menu and clear the following check boxes:


     * .NET Open Application Support

     * Adobe Flex Controls Support

     * Delphi and C++Builder Open Applications Support

     * Java Open Application Support

     * JavaFX Open Application Support

     * MSAA Open Application Support

     * Microsoft Visual C++ Open Application Support

     * Open Applications Support

     * Qt Library Controls Support Plug-in

     * Qt Library Support Plug-in

     * Silverlight Open Application Support

     * Visual Basic Open Applications

     * Web Testing Plug-in

     * WPF Controls Support Plug-in


    Click OK to close the dialog and then click the Save All button to apply the changes.

  • jarnold615's avatar
    jarnold615
    Occasional Contributor
    Unfortunately, I'm running into the same problem with the trial version of TestComplete 8.6.  I also tried turning off the Open Application extensions, but that didn't fix it.  The problem I'm seeing sounds exactly like what's described in this posting by another customer of yours:



    TC7 slowness when populating text fields



    Can you tell me what the resolution was to that issue?



    John
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi John,


    Most likely, the problem is specific to your application. So, to resolve the problem, please contact our Support Team and send them:


    1. Your TestComplete project.

    2. Your tested application.


    Thanks.