An example of IE memory leak test in software testing

Source: Internet
Author: User
Tags memory usage tag name

Test a business data portal for functional testing of the Task manager, found that the IE process has reached the 423,145k, suspected of a memory leak, so I intend to use IE plug-in JS memory leaks dector to detect, However, after some operations that could cause memory leaks, the test results were always normal and no memory leaks were found, and developers had to decide for themselves which Ifram were not destroyed to optimize the system and reduce the use of memory.

In the afternoon, check the previous test document, found that the use of sieve to test this type of system of IE memory leaks, usually in the report refresh process, usually occurs memory leaks, so, with sieve test, sure enough, after login, memory leak display bit 58, in the report every time the refresh, Memory leak shows +1, in the switch report, the memory leak on the basis of the original increase of 7, and then exit, the memory leak from the original 771 under increased to more than 1200. The ID and tag name of the memory leak that is recorded by this tool can be used to find out the code that has the memory leak.

About memory leaks, simple explanation is no longer be used should be released resources are not released, so that the program occupied by the memory has increased, ie browser memory leakage, resulting in IE memory leakage of the main case for the JS object instance with the DOM object of mutual reference, "internal function Reference" ( Closures) "and Dom insertion Order leaks, where the most common is a JS object instance with a cross-reference to a DOM object, and a common use for object-based JScript is to augment the DOM object by encapsulating the JScript object, which is typically used in the construction process when the DOM object is involved , to create a reference to the DOM object, the DOM object also establishes a reference to the JS object instance, which forms a loop, although it is convenient for JS to call the DOM or to find the instance from the DOM backwards, but if the object is destroyed or the document Unload will cause memory leaks when they are not lifted from their references. JS GC can recognize loops, and when references to DOM nodes and event handlers disappear, they are automatically recycled, but IE's own memory manager does not recognize loops, so memory leaks occur when the memory is not reclaimed. For example, when a page is refreshed, memory continues to rise because the memory occupied by the front page has not been released.

Java leak Memorys Detector by giving a test solution at the end of each URL, if there is no memory leak, the URL is displayed as green, and if a memory leak is displayed in red, the details of the memory leak can be recorded. The left section shows the code location for the memory leak as bold, displays the details in the middle of the grid and call STACK, and displays the complete code on the right.

Sieve the operating test by entering the address of the system you want to access in the Address bar, in the middle of the direct display to access the system interface, the following column shows the use of COM and DOM, the right display real-time data: memory usage, memory leaks, etc., if a memory leak can be seen by the right data, and then click Show The leaks button can see the memory leak details such as ID, but not all memory leaks will be recorded all the details, only a small number of IDs are recorded, but also through the interface of the automatic refresh button on the system to refresh, instead of manual refresh. However, the tool used to occupy a large amount of memory, the operation of more than will not respond, some operations will also cause automatic shutdown, in the replication of memory leakage information can only select all the details, can not filter out some unnecessary information and empty information, resulting in the use is not very convenient.

In a word, ie memory leak lookup need not only have certain experience, also need to have a certain degree of patience, of course, there is a use of effective and convenient tool of course better, now, for IE memory leak test I also just started, there are many need to learn places, I would like to share with you the testing process, common progress!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.