cancel
Showing results for 
Search instead for 
Did you mean: 

TestComplete 11.0 - Memory Issue

Highlighted
Occasional Contributor

TestComplete 11.0 - Memory Issue

Environment Details:

Windows 7, 64 Bit, 8 GB RAM
TestComplete 11.0

 

Project Details:

Used NameMapping Approach

Defined All object references in one script file as Global Variables.
There are 3000+ Variables.

Reading and Writing Data from Excels

 

Problem:

When i open my project. RAM usage is 320-340 MB

When i run any of my test function RAM usage will increase to 450-500 MB
If i keep on running test functions RAM usage will increase to 800+ MB

This is making my test execution go slow and crashing application under test.

Anybody faced this kind of issue ?

Why RAM usage will be increasing every time ?

Is there any memory leakage ?

Why after execution RAM usage is not coming to normal ?

18 REPLIES 18
Highlighted
Contributor

Re: TestComplete 11.0 - Memory Issue

Defined All object references in one script file as Global Variables.
There are 3000+ Variables.

 


 

What is the purpose of doing this? It probably isn't causing the memory issue you're facing, but it seems redundant and unnecessary if you know how to use NameMapping properly.

 

 

As for the memory issue, can't say I have the exact same problem as you, but I used to notice TestComplete would use more and more RAM if I was using it over the course of a day or two without restarting it. I eventually came to realize that the SQL DB connections I was opening weren't always being closed because the test script would sometimes be interrupted and the code to close the connection wouldn't be executed. So if you are opening DB connections or files or anything else that could lead to a resource leak I'd suggest trying to make your code more robust to ensure any open resources are closed. I used the OnStopTest event to close any open connection I might have.

Highlighted
Super Contributor

Re: TestComplete 11.0 - Memory Issue

We are using name mapping on a 64-bit machine with 16GB of running TC 11.30. We are unable to run our entire test suite without before tcHost.exe usage grows to 1.9gb and TC locks up. If a few items are disabled the test will run all they way through. I've nearly reached the end of the road here.

Highlighted
Valued Contributor

Re: TestComplete 11.0 - Memory Issue

Ran into a similar issue with our scripts.

I would suggest contacting support.


''-Praise the sun and Give Kudos.''
Highlighted
Community Hero

Re: TestComplete 11.0 - Memory Issue

It's been a while since I've run into problems like this.  However, IIRC, part of it has to do with how much information you're writing out to your test log. If you're calling Log.Message for every little thing or if you're not using Log.LockEvents in your code, I think that a good bit of what you might be dealing with is that TC has to store a lot of the logging information in memory.  Take a look at optimizing your utilization of the logging, reduce the number of messages, and make sure that Log.LockEvents is in place to prevent too much information being written out.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Super Contributor

Re: TestComplete 11.0 - Memory Issue


@tristaanogre wrote:

It's been a while since I've run into problems like this.  However, IIRC, part of it has to do with how much information you're writing out to your test log. If you're calling Log.Message for every little thing or if you're not using Log.LockEvents in your code, I think that a good bit of what you might be dealing with is that TC has to store a lot of the logging information in memory.  Take a look at optimizing your utilization of the logging, reduce the number of messages, and make sure that Log.LockEvents is in place to prevent too much information being written out.


I'll try locking the log to see if this fixes the problem. In all the discussions with support on this issue this was never mentioned. Makes complete sense to me. Thanks.

Highlighted
Community Hero

Re: TestComplete 11.0 - Memory Issue

Hope that it helps. I'm not sure how correct I am in this but I know that logging is a big memory hog for TC in previous versions. Let me know if this helps and, perhaps, this is a memory optimization thing that SmartBear can work on for future versions.

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Super Contributor

Re: TestComplete 11.0 - Memory Issue


@tristaanogre wrote:
Hope that it helps. I'm not sure how correct I am in this but I know that logging is a big memory hog for TC in previous versions. Let me know if this helps and, perhaps, this is a memory optimization thing that SmartBear can work on for future versions.

I'm confused about something. Wrote the following function and passed 'true' and 100 and yet the logs shows more than 100 entries (see image). What am I missing?

 

function LockLog(val, count){
    if(val == true)
        Log.LockEvents(count);
    else
        Log.UnlockEvents();
}

log result.JPG

Highlighted
Community Hero

Re: TestComplete 11.0 - Memory Issue

In all of that, where are you calling "LockLog"?  

Also, the "100" is not the maximum number of events that will ever log, but it is the maximum number kept in buffer that will be dumped out to the log file upon the logging of a warning or error. 

Quote from the userguide:

If an error or warning occurs, the buffered messages will be posted to the log to help you pin down the source of the error or warning. To disable the buffer, set Count to 0.

 So, you would call "LockLog" at the very start of your test project to ensure it is on for the duration then, every time a warning or error is logged, the last 100 events leading up to it will be logged.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Contributor

Re: TestComplete 11.0 - Memory Issue

Well there doesn't look to be an error or warning so there should be 0 events in your log. The 100 only says to hold onto the last 100 events and put them in the log if an error or warning occur. That's how it works for me at least.

 

Seems like something must be going wrong with your function or maybe the call to your function. I'm not very familiar with JScript so I can't say for sure, but maybe try adding a Log.Message() within the if statement to see if it's actually reaching the Log.LockEvents() call.

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors