Aqtime code coverage in-depth analysis II

Source: Internet
Author: User

Aqtime coverage profiler has some good features, so that we can better detect code coverage.

New Area and files to ignore

When the target module is added, aqtime displays the object hierarchy of the module in a tree structure, such as the C/C ++ DLL, DLL --> OBJ --> API. If we only want to profile specific OBJ files, or exclude that the compilation tool adds its own OBJ files during compilation (because these OBJ files will affect the final result, you do not need to profile them), you need to use the new area function:

Expand the DLL-to-OBJ view, select your own OBJ file, right-click --> add selected to Area --> Add to new area ..., in this way, you can press line level or routine level, only for the OBJ file you want, that is, only the profile is the code of your own program. Remember to only select the new area.

At the same time, if your program also calls the function library written by others, you can find the complete path name of these function library files, in the menu bar options --> files to ignore... of aqtime ..., add them to the list of objects to be ignored. Note: This is a global option that is valid for all projects. The more files are added here, the longer it takes for aqtime to start coverage profile, and even causes false positives.

By creating the new area and files to ignore options, you can perform coverage profile only for specific code.

Mark partially executed lines

Aqtime provides an option called "Mark partially executed lines". Different values of this option affect the final line coverage result. By default, aqtime sets this option to "partially executed (yellow dot. Select add or remove buttons --> customize --> commands to add the options to the menu bar of aqtime.

Why does the value of this option affect the result of line coverage? For such statements as if (condition1 | condition2), aqtime considers the row to have one or two hit Blocks Based on the value of this option.

First chance exception 0 XXXXX

After the project is set, run the coverage profile task. In the event view, you can see some information about "first chance exception..." and there is a big red cross in front. First, you may doubt whether there are major problems in the program. In fact, this is usually not the case, it is to tell us that an exception is thrown and handled, specific visible http://blogs.msdn.com/ B /davidklinems/archive/2005/07/12/438061.aspx

Merge

Aqtime provides the Merge function for results. One is to integrate coverage of different test tasks, and the other is to make personal tasks more significant for aqtime itself, because aqtime is a relatively large, long-time task, sometimes crash, this time is very sad. In this case, we 'd better divide the large and long tasks into several smaller ones, execute them separately, and merge them. Before merging, it is best to copy a project with results saved. If the crash dialog box still appears during merge, do not select "terminate the application... "This option. Otherwise, all the previous profile results will be lost due to the loss of debug info.

Top 10 uncovered routines

In summary, both the total and each thread have a "Top 10 uncovered routines" and "routines with Max hitcount", "routines with Max hitcount, it is to compare who has more times of hit, but for uncovered, it is a bit confusing. I started to think it was obtained from the static analysis of the function call relationship of aqtime Based on code. I asked aqtime support people, the results are totally different. Aqtime will be automatically sorted based on the percentage of coverage. The highest hit value is Max hitcount, and the "Top 10 uncovered" value is randomly generated in the routine where the hitcount value is 0.

 

 

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.