Submit and vote on feature ideas.

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 analysis in Insure++

rerrer
rerrer Posts: 9

Hi all,

From what I read online, Insure++ is able to provide the code coverage analysis of the code by using the TCA View, but how do I generate the tca.log file?

Comments

  • I believe that, by default, tca.log is always generated. Check the working directory and the directory containing the executable (the latter may only apply to Windows).

  • rerrer
    rerrer Posts: 9

    I realised that I had to go to Insure++ Control Panel > Compile > Tick "Generate coverage map data" in order to generate the tca.log file. However when I try to load the tca.log file on TCA View, nothing is appearing

  • rerrer
    rerrer Posts: 9

    Update: I found out that tca.log is not appearing because tca.map is not being generated, when I am building the c++ project from command line using devenv & inject.

    However if I use the Insure++ plugin for visual studio to build the project, it will be able to generate on tca.map file (on some occasions but not all the time)

    Can anyone advice on why is that so? And how to I generate the tca.map file via building from command line?

  • rerrer
    rerrer Posts: 9

    Another issue I am facing now is that the code coverage analysis did not look through all the existing .cpp files within my solution. Is there any way for me to configure it?

  • Rich
    Rich Posts: 34 ✭✭

    Hi,
    It's very difficult to diagnose problems without access to specifics. You should contact [email protected] for that. Be sure to mention your compiler version, (VS2012? VS2015?), and version of Insure++ that you're using. BTW: A new version of Insure++, (7.5.2), is now available as of yesterday.

    In general, here are some things to know about instrumentation, coverage or otherwise:

    Coverage map data will only be generated during instrumentation, and only for functions which are instrumented. Insure++ doesn't instrument templates, (except for fully specialized ones), because to do so would break the ODR, (One Definition Rule).

    Individual functions may not be instrumented for various reasons, such as:
    1. The given code is not valid, but the compiler accepts it as a bug
    2. The code is valid, but there is no way to instrument it without producing invalid code, (e.g. the ODR and templates).
    3. The code is valid, and the instrumentation is valid, but the native compiler doesn't accept the code because it has a bug.

    Any of the above will produce uninstrumented code, which will not have coverage data. The "configuration" for any/all of this is simply your code, and your compiler.

    --Rich