Forum Discussion

shodnefield's avatar
shodnefield
New Contributor
15 years ago

Tests run individually but not in a batch

I have a collection of keyword tests that run quite well individually but fail when I try to run them as a batch. Individually, the tests open IE9, perform a series of actions against a Flex application, then against an ASP.NET flavored website, then back into the Flex application for a few more actions, and then close the browser. As individual tests they run from start to finish without any issue at all. However, when I put them into a batch and try to run the batch, explorer seems to close early, before the point where Test Complete performs the close action. This of course causes the test to fail and the batch to stop. I don't understand why IE9 woudl exit early in a batch but never in a single run. Any ideas?



This seems like a new problem, at least, not one I noticed yesterday. Anybody know if chagnes were made to IE9 in the last round of patches that TC is not compatible with?



IE9 v. 9.0.8112.16421



Also, using the RunTime loader for access to the Flex application.

7 Replies

  • Hi Scott,



    It looks like IE crashes silently and therefore the process is terminated unexpectedly. Please follow the steps below to help us investigate the problem:



    1. Make Internet Explorer launch only one process. To do it, in the system registry, search for the TabProcGrowth value in the HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main key (if it is not present, add the value of the string type) and set it equal to zero.



    2. Request & download AQtime Standard, which is our free profiling tool, from our web site:


    AQtime Standard



    3. Install the tool.



    4. 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



    5. Select the 'File | New Project' main menu item.



    6. Right-click the Modules panel and select the "Add Module..." context menu item. In the Open File dialog, select the IE's executable file and click Open.



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



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



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



    10. Start IE via selecting "Run | Run" in AQtime's main menu.



    11. Reproduce the problem.



    12. 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.



    13. Save the panel's contents to an HTML file and send me the file via our Contact Support form:


    http://smartbear.com/support/message/?prod=TestComplete



    Thanks in advance.

  • Thanks for getting back to me Allen,



    I think the registry change to IE broke all of my test scripts. I have steps at the beginning of each keyword test that clear the browser cache to be sure I am starting out with fresh cookies and page caches. With the registry setting for TabProcGrowth set to 0, test complete fails to recognize the browser at all. When I delete that entry in the registry, the tests all work as individuals once again but still fail to run as a batch.



    I am not able to produce the trace log you requested as the issue happens near the end of each keyword test where TC closes IE9. As it stands I cannot get TC to recognize the browser once I've implemented the registry setting you indicate and cannot really even begin the tests.



    Please advise,



  • Hi Scott,





    As mentioned in my post, the setting just makes IE use only one process. So, changing your Name Mapping scheme to identify the process just by its name (without its index, which is, I suppose, equal to 2 in your scheme), should solve this. Using only a single IE process is a more reliable approach, actually.


  • Thanks Allen,


    Might you be able to suggest an easy way to change the name mapping to accomplish this? I have some 50 individual tests written at this point. These are keyword functionality tests, for reference. They work very well when run individually without the registry change and, I am not so excited about an opportunity to re-record all of them. So far I have not been able to find a way to edit these values except to completely re-record the test.


    In my keyword tests I have processes iexplore and an iexplore1 that both seem to identify IE9. When the application is first started it is named iexplore in the keyword script, the first interaction with it (clearing the browser cache) has the process named iexplore1. TC starts IE without issue but cannot perform the first interaction when I have the registry hack in place. I am assuming this is because the process has a different name. How do I change the name without deleting the remainder of the test and re-recording?


    I understand that using a single process is probably more reliable but another 2 weeks to re-record all of these tests to support a single process approach greatly reduces the value of those tests. Especially since, at this point, this is only a trouble shooting step to try and understand why IE is crashing out when TC attempts to close it.


    Please advise,

  • Hi Scott,



    There is no need to re-record anything. One of the advantages provided by Name Mapping is that you can change your mapping criteria in a single place (in your Name Mapping scheme) and these changes will affect all your tests. Just make both iexplore and iexplore1 refer to the same process via editing your Name Mapping scheme. To do it, simply remove the Index property from the processes' mapping criteria - this will make TestComplete take the first matching process which has the needed name. To learn how to do this, please see the Modifying Mapping Criteria help topic. After doing this change, both iexplore and iexplore1 will refer to the same single IE process and you should be able to run your tests.



    BTW, note that you should not record new tests while IE is using only a single process if you're going to continue using two processes later.
  • Thanks Allen,



    I was finally able to reproduce the issue and I sent you the AQtime log file. It doesn't look like there's much in there that would be useful though. In fact, it looks like AQTime doesnt't even see the explorer process that crashes out. Please let me know if you need any other files or information to move this forward.

  • Hi Scott,





    We've received your message, thanks. Let's continue working on this via e-mail.