”Unable to allocate memory” errors while running a test set

  • Questions
  • ''Unable to allocate memory'' errors while running a test set
Question ID: 104228
2
0

When running automated test sets via the Test Lab feature in Quality Center, I have been frequently receiving the following error in a Windows dialog: "Unable to allocate memory." The window has a title of simply "Error", so I am not certain whether this is in Quality Center or QuickTest Pro.

The add-ins ActiveX, Visual Basic, and Web are used during my testing. Quality Center is running in an Internet Explorer browser (v8.0.6001.18702).

Is there possibly a memory leak in QC or QTP causing these errors? Do you know whether the error message is being generated by QC or QTP? Thank you.

Marked as spam
Posted by (Questions: 45, Answers: 0)
Asked on September 27, 2010 3:05 pm
16 views
Answers (1)
4
Private answer

Are you running multi QTP test from QC? When running several Tests from QC, the Remote Agent software by default will not shut down QTP until all tests have been executed. If you have very large tests and/or code that does not dismiss objects and variables the object might not get dismissed which will be retained in memory after the test is completed. The best way to clear objects and variables from memory is to restart QTP between every run. Since restarting QTP every run can cause an increase to run times of test I recommend shut down QTP between every couple runs. This is done by going to the Remote Agent and changing the setting to close down between every x number of runs. By default this is set to unlimited (value 0) and I would recommend a small number like 2 or 3. This will increase testing times because the wait for QTP to start up between each test, But since VB scripts are not the best memory management restarting of QTP prevent on memory resources.

Also, recommend to look at code for a coding problem where objects are not getting release by scripting engine. There are ways of coding to help the engine release the object. The best way to release object so that memory can be clean up is setting objects to nothing after being used.

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on September 27, 2010 4:16 pm
I ran a series of over 40 tests through the QC Test Lab after changing the option in the remote agent to shut down QTP after every 2 test runs, and the entire set was executed without any of the ''unable to allocate memory'' problems. I still need to examine my scripts to be sure that all of my file system objects are being set to Nothing, but at least the work-around you suggested eliminated the errors. Thanks again, Hank
( at September 27, 2010 9:10 pm)