Export VisualGDB Code Coverage Report

Sysprogs forums Forums VisualGDB Export VisualGDB Code Coverage Report

This topic contains 2 replies, has 2 voices, and was last updated by  Foximaxi 2 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27846

    Foximaxi
    Participant

    Hello,

    I’m playing since a while with the code coverage tool on an STM32 device. On the pro side, it’s very helpful to optimize the code and see whats happening in the system (even “live”). True fun, BUT I should save the results in our software certification documents. For my sorrow I did not found any possibility to do that. Is it possible to add a feature in the next update, to export the results in a CSV(preferred), TXT or whatever file?

    Many Thanks

    Thomas

    #27855

    support
    Keymaster

    Hi,

    No problem. Although this is not documented yet, VisualGDB exports a public interface for reading the coverage report files. You can try it out as shown below:

    1. Create a new C# project and reference the VisualGDBCore.dll assembly.
    2. Create an instance of the CoverageReportReader class. Pass the path to the report file as the first argument, and null as the second one.
    3. Use the AllFunctions property to get information for all functions.
    4. Call the GetFunctionsInPotentiallyMatchingFiles() method with the name of a source file to get detailed line-by-line coverage information.

    You can use Visual Studio’s IntelliSense and Go-to-Definition command to see the properties and methods of the CoverageReportReader class.

    #27874

    Foximaxi
    Participant

    Thank you that works perfectly!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.