Forum Discussion

North-E's avatar
North-E
Occasional Contributor
15 years ago

Any difference between script execution by TC and similar manual actions?

Hello!



I'm testing Visual Studio C++ application with TC v7.5 (JScript language is used). It is the multiple document application, and I wrote special scripts to manipulate with documents' windows.



To understand how I can close one of these windows I recorded a script clicking close icon (X) on the top right of it. TC generated the code with window object's Close() method. During test run the window closes without clicking close icon (X), and this thing wasn't disturbing me before...



But suddenly one of my tests crashed the application on determined window closing. This happens every time I run the test. I tried to repeat it manually...but the application is still alive. I also tried to close the window by Ctrl + F4, and result is the same - application crashes only during automatic test execution.



Therefore, I have the following question: is there any difference between automatic and manual test execution (exactly - between calling methods)? I thought they are the same but I have no explanation of behavior described higher at the moment.



Thank you for attention.

4 Replies

  • Hi Dmitriy,




    is there any difference between automatic and manual test execution (exactly - between calling methods)?



    The Close method sends the WM_CLOSE message to the window in question. There is a chance that TestComplete Open Application hooks affect the behavior of the tested application. Please follow the steps below to help us investigate the problem:


    1. Download a free trial version of AQtime 6, which is our profiling tool, from our web site. This version can be requested on the following page of our web site:

    http://www.automatedqa.com/downloads/aqtime/


    2. Install the tool.


    3. Start AQtime.


    4. Select the 'File | New Project From Module...' main menu item.


    5. In the Open File dialog, select the tested application's executable file 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. Set the "Profiling Time | Event View | General | Exceptions | Depth shown" setting to 100 and click OK.


    9. Start the tested application.


    10. Click the Run | Attach to Process... main menu item in AQtime.


    11. Select the tested application's process from the list by double-clicking it and click Run in the dialog that appears after that.


    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 me the file via our Contact Support form:

    http://www.automatedqa.com/support/message/


    Also, here are the steps which can help you avoid the problem and help us narrow it down:


    1. Use Process Filter to make TestComplete treat only the tested application as Open (see the "Project Properties - Process Filter Options" help topic for more information).


    2. Disable the Open Applications Support plug-in ("File | Install Extension...").


    3. Disable the plug-ins marked with a red icon (they will be marked after you disable the Open Applications Support plug-in). Keep enabled only the plug-ins you use (e.g. the Microsoft Visual C++ Open Application Support plug-in).


    4. Enable the Open Application Support plug-in.


    5. Check whether the problem persists. If it does not, follow step 6.


    6. Enable the plug-ins one by one and repeat step 5 after enabling a plug-in. If the problem appears after enabling a specific plug-in, let us know the plug-in's name.


    Thanks in advance.


  • North-E's avatar
    North-E
    Occasional Contributor
    Hello, Allen.



    Thanks for your answer.



    First of all, I followed the second steps offered by you - disabled "Open Applications Support plug-in", and then all red-marked plug-ins excepting "Microsoft Visual C++ Open Application Support". Unfortunately, the bug is reproduced.



    After that I installed AQTime Demo, followed the steps described higher (to reproduce the problem ran corresponding TC's test) and sent the results via Contact Support form (posting the link to this topic there).



    Of course, my application has problems and memory leaks but I'm bewildered by the fact that I can't reproduce the problem by hands.



    Thank you. Dmitriy.
  • Hi Dmitriy,


    Thank you for the information. Let us continue working on the problem via e-mail.