Forum Discussion

charles_1's avatar
charles_1
Occasional Contributor
7 years ago

Inconsistent Running of Test Complete 12

I am testing a desktop application which is written in VB, my tests run so far then I get either of the two following messages:

 

Subscript Out of Range

The Object Invoked has Disconnected From Its Client

 

I get this error on a function which has been used numerous times already in my tests run (up to 100 times already), if I restart the test from my test case before the error occurred then it will carry on and process more cases before getting one of the errors again.

 

I am finding it very frustrating that Test Complete is being so inconsistent and I have to run my test set in parts and hope it runs.

 

Any ideas why I would get these two messages?

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    It would help to know what code is being executed at the points those errors occur. I suspect that the problem may be some sort of timing issue where you are attempting to execute something that your AUT might not be ready for. Please share your code.
    • charles_1's avatar
      charles_1
      Occasional Contributor

      the line of code is the same for both errors:

       

      if(grid.Columns.Item(i).Caption == header1) {...}

       

      where grid is a vb constructed grid and header1 is a static string of text.

       

      The test follows a simple loop, open test case, get figures from the grid close the case, move to next test case. I can process multiple test cases before getting the error and there are controls built in to make sure the grid is shown before doing the if statement.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        I have some experience with working with VB grids in an application we test and I've seen that error before... Usually, it's solved by making sure that the grid is fully loaded and, if anything refreshes the grid, actually call a "RefreshMappingInfo" call on the grid's parent.

         

        However, the behavior you've described almost sounds like some sort of memory error, that the VB application is running out of available memory to include the information that TestComplete uses.

         

        Are you keeping the application running between all the test cases or do you close and re-open on each one?