What are the causes of the "Read past end of buffer" SilkTest error message?

What are the causes of the "Read past end of buffer" SilkTest error message?

This issue is generally seen through use of the Classic Agent with Silk Test Classic and can be caused for a number of reasons as seen below:

1)  A disruption / loss of connection to the Agent and will result in an intermittent problem, try rebooting the machine to resolve the issue.

 

2)  Within Silk Test Classic add the statement below to the start of the testcase which reports the error:

Agent.SetOption (OPT_HANG_APP_TIME_OUT, 10001)

The option above changes the amount of time the Agent will wait for a response from the application under test. The error can be raised because the default time-out is reached causing corruption within the Classic Agent and it generates the read past end of buffer error.

Increasing the Mouse and Keyboard delays can also help to resolve the issue. From within Silk Test Classic navigate to Options -> Agent


3) If you are testing an application within a desktop web browser, try setting the below option to the beginning of the testcase:-

browser.forceready(TRUE)

This option as the name suggests, forces the browser to be in a ready state where automated playback can resume.  The page may not be in a ready state while still loading content or when Silk Test Classic never receives a Document complete message from the browser.

Then call Browser.ForceReady(FALSE) when the browser is behaving properly again or at the end of the testcase.



4) If the issue is still frequently occurring and at a particular point in the AUT (Application Under Test). The issue could be the result of the parental structure of the page changing.  When Silk Test enumerates a window, the Agent reads the hierarchy of the AUT from the parent to the child window.

Silk Test then checks the hierarchy of the app by reading from the child window to the parent.  If during this check process a parent is missing or has been changed then the "read past end of buffer" message can occur.

This can sometimes be checked in 4test by using GetChildren() and GetParent() to determine if the hierarchy changes.

As an example, please see the script below which demonstrates the use of GetChildren() and GetParent() functions.  The below script retrieves the Parent and children windows currently used within the app and prints these names to the results file.

  list of window lsChildWins = TestApplication.GetChildren()  

  window wChild   

  window wParent = TestApplication.GetParent()  

  Print("Parent window of TestApplication is:-    '{wParent}'")   

  for each wChild in lsChildWins    

Print(wChild)

Next, we can perform some action on the application to invoke a new window:-

TestApplication.File.New.Pick ()

If we use the below script after the above action, we should see an additional entry to the results file on completion of the testcase.

The output of the results can then be used to compare the differences of the application’s windows before and after actions to possibly pinpoint the cause of the issue.   

Print("Parent window of TestApplication is:-    '{wParent}'")  

lsChildWins = TestApplication.GetChildren()   

for each wChild in lsChildWins    

  Print(wChild)

 

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:16
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.