Missing Code Coverage Results

tnnrwy63tnnrwy63 Posts: 15

Hello,

Is there any way to debug missing code coverage analytics from a linux arm-distribution unit-test?Using the instrumentation flow included with Cpptest and some example QT code, I can see a clog file being generated on my target but Parasoft doesn't display any code coverage after the test is complete and the clog log file have been scp'ed back to my host.

I know my lines of code are being executed because they are generating expected results on my system. Testing asserts are also working properly, so I know that some of the parasoft features are working.

I cant read the contents of the file because its just random symbols and characters ( even when code coverage does work ) but the size of the file does seem smaller than usual.

Comments

  • MirekMirek Posts: 26

    Hello,

    I assume that there are two test configurations used in the test flow, one for building the test binary and another for loading test results (.tlog/clog pair) which are copied from the target. If this is the case, it is important to make sure that:

    • both test configurations have identical instrumentation settings. This includes instrumentation features selection for Tested/Additional/Test case sources (Test Config panel->Execution->General->Instrumentation mode ->Edit). The typical problem is different coverage metric selection (note that builtin://Utilities/Load Test Results has by default only Line Coverage selected)
    • both test configurations have the same settings in "Symbols" tab (Test Config panel->Execution->Symbols)
    • When running the second test configuration for loading the results, selection in the project tree has to be the same as when "build" configuration was used.

    Let me know if this helps.

  • tnnrwy63tnnrwy63 Posts: 15

    This is a single test configuration using the Test Execution Flow: "Build and Run Test Executable for ARM Embedded Linux Distribution". When I run this test configuration on other code bases, I get code coverage just fine. Im also running it with the instrumentation features selected for Tested/Additional/Test case sources. My folder structure isnt changing either.

  • MirekMirek Posts: 26

    Please check what is the coverage type selected in the coverage view. It needs to match the type of the coverage collected during analysis. If this does not help, please contact our support team - they will probably need to collect some logs to further investigate.

Sign In or Register to comment.