C + + code coverage tool coverage Validator

Source: Internet
Author: User

Most of the C + + code coverage tools on the market are charged, coverage validator is no exception. Coverage validator should be few people heard, I also in StackOverflow listen to others introduced. So download a trial. Interested friends can go to https://www.softwareverify.com/cpp/coverage/index.html to learn more, there is a 30-day trial version.

Before trying to coveragemeter, it is quite convenient to use, the main principle is to replace the original compiler, in the code to insert piles. Therefore, Coveragemeter is characterized by the need to re-compile the code being tested. This is also a common approach for most coverage tools. and coverage Validator, do not need to re-edit the code, only need to provide the binary program of the PDB files, you can count its code coverage. It can also count line coverage, branch coverage, function overlay, and so on.

Coverage Validator is also very simple to use, and you only need to:

1. Use coverage validator to run your program under test.

Through the menu "File"-"Start application", the need to run the program, and then a lot of options, such as the development of program path, command line parameters, environment variables, etc., but also provides several ways to start the program, such as: CreateProcess, which is the most common way.

2. View coverage results in coverage validator.

The results are also very handy, with colors in the Code window that mark which rows are overwritten and which rows are not.

You can also:

Set the filter criteria to only count the coverage data for a module that is loaded. For example, if you are testing a DLL, you can set the filter criteria to only count the code coverage of the DLL. You can also set the filter to only count the coverage data for a class, a function. The method of setting up the filter is very simple, I do not stick my own diagram. Menu: "Configure"-"Settings"-"Filters"

The following is the interface of the official website of the reference (to be honest, the interface is very primitive)

Total results page:

Detailed results page:

Since this software is commercial software, it is also very simple to use, and with detailed documentation, so this article does not intend to demonstrate in detail how coverage validator works, the purpose of this article is to let you know that there is such a tool, may bring you new ideas, Maybe this tool is really useful to you.

#1楼2009-07-11 23:20 jjjC # can be used in the MSTest, C + + will not, this is good, I looked back seriously.Reply Reference#2楼 [Landlord] 2009-07-11 23:29 Coderzh @ jjj
I am also confused about the support that Ms does not provide for C + + code coverage. Support (0) objection (0)Reply Reference#3楼2009-07-14 01:09 I don't understand .Code Coverage tools
What do you do with it?Reply Reference#4楼 [Landlord] 2009-07-14 12:48 Coderzh @ Don't understand
Coverage is a means to measure the integrity of a test. The coverage of software is generally divided into logical overrides (code coverage and structured coverage) and functional overrides. By using coverage data, you can know whether the tests are adequate, and what weaknesses are tested, which in turn can guide us in designing test cases that increase coverage.
Code coverage tools are tools for statistical coverage. Support (0) objection (0)Reply Reference#5楼2013-11-21 21:43 Alexia (minmin)Bullseye coverage this software?

Http://www.cnblogs.com/coderzh/archive/2009/07/11/1521706.html

C + + code coverage tool coverage Validator

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.