Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Code Coverage other than Line Coverage

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in C/C++test
Is there an option in the parameter file that will allow for the running the code coverage to be something other than "Line Coverage", for example "Modified Condition/Decision Coverage"? If so what is the option?

When running the unit tests can you have one pass of the unit tests report on all the types of coverage or do you have to run separately for each option?

One last question...when a developer adds code and the code was 100% line covered, is there a report that can automatically be generated to indicated that the code coverage has changed and is not at 100% any more? Or do you have to manually look through the reports to see that the percentage has changed?

Any information would be greatly appreciated.
James

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Hi James,

    You can configure your own test configuration that will run all types of coverage at once. To enable this, open up your test configuration in C++Test. In the 'Execution' tab you should see a drop-down box called 'Instrumentation mode'. If you choose 'Custom instrumentation' from the box and click on the 'Edit' button next to the drop-down box, then you should see a new window with various options, including checkboxes for all the different types of coverage for when you run your unit tests. Now when you run your test configuration you should see information for all the different types of coverage you chose.

    Also, I don't believe there is any functionality in C++Test that allows you to see the differences in coverage between reports. That is something you will have to do manually.