Forum Discussion

alinder's avatar
alinder
Contributor
11 years ago

ChildCount property value not updating correctly in TestExecute 10

I have a block of code in a custom script operation that iterates through all the children of a panel and writes their text values (if any) into an array for a specific kind of test.



This used ChildCount on the panel to dimension the array, and then as the upper boundary on the loop we use to iterate through the child objects.



This code worked without issue in TestExecute 8 and TestExecute 9. However, in TestComplete 10 the ChildCount value is remaining from an older version of the object, and is only being updated when the text value for the child object is being read out inside the loop. This results in test exceptions when the loop tries to perform actions against objects that don't exist.



In all versions, Aliases.RefreshMappingInfo was called before retrieving the panel object.



During the debug process for this issue, RefreshMappingInfo was called directly on the panel before operations were taken with it, with no improvement.



The workaround that has been found to work is calling Refresh on the panel, which seems to be the apparent workaround.



It is not ideal that our test code requires modification to execute properly when we test agaisnt Windows 8.1 with TestExecute 10.

5 Replies

  • Does mapping info contain runtime properties of an object?



    I've worked mostly with dynamic objects (virtually nothing in the project is static so most identification has to be done on the fly during the run) and have to use sys.refresh quite frequently to make sure it's pulling the most current info from the DOM. This does affect things like child counts.
  • I had first tried RefreshMappingInfo because of the guidance in this thread, and the descriptions imply cached data ought be cleared as the object was mapped to an alias.



    (TestExecute 10.10 is the version in use, for reference.)



  • I just updated to 10.10 yesterday. Was running 10.0 for months previously.



    A lot of my tests do similar using child counts to determine loop length and they still work. As I say though, I use sys.refresh as its all done dynamically. Without sys.refresh, I get all sorts of incorrect results. I've had those refreshes in place since version 9.x which we started with.



    Incidentally, how are you finding TestExecute performance with 10.10?



    I have a thread just below this as I'm seeing a huge performance fall off with it. TestComplete doesn't seem to be affected though. Although I've done a lot less benchmarking against that ...
  • We use an automation framework that adds a lot of abstraction layers, but that sacrifices a lot of efficiency; it honestly renders performance pretty poor regardless of version differences.
  • I use a data driven framework as well. And we have a huge suite of tests currently running from it as part of the nightly build process. Pre-update, a full run was bout 6 hours.



    And the current project has a VERY busy DOM in some places. So it can be quite slow at times. Especially when things get busy and I'm using chrome.



    But the performance drop off I'm seeing has been huge. Like over 100%. If you're seeing the same, the differences in execution time should be obvious. I've given a few time examples in my thread. And it isn't application specific. Everything it does seems to be taking twice as long, if not more.



    I left it running about 3-4 hours worth of our normal 6 hour run when I left work today. It took over 7 hours to complete. :(



    Current plan is to revert back to v10.0 tomorrow and see if the performance comes back.