This project is read-only.

Run OpenCppCoverage for our exe that is automatically executed by another exe

Apr 26, 2016 at 5:55 AM

First of all commendable effort for this amazing project and for keeping it alive. I am evaluating various code coverage tools for our product compiled using VS2010 and found this.

I have 2 questions:
  1. The scenario is that we have our own automation tool that works on "record and play" basis. So we feed our product exe to this tool with a set of recorded steps and it executes our exe automatically.
    Is there any way i can find code coverage for our exe while I am executing it via another automation exe?
  2. Is there a way to generate reports similar to LCOV (image attached) which is aggregated by folder and we can drill down to file while seeing aggregated percentages?
There definitely is a need for better and more detailed documentation, can we somehow work together where I attempt to document it from a new-user perspective?

Apr 28, 2016 at 3:23 PM

Thanks for your support!

1: If I understand correctly, you have a tool that runs your code and you want to know the coverage for your code. This should work if you add the flag --cover_children.
2: You cannot export directly to LCOV. As describe here, there are 3 kinds of export: html, binary, cobertura (xml). Perhaps you can have a look at a converter from cobertura to lcov. You can also parse cobertura file and create the report you want.

I am really interesting about your feedback on the documentation. Do you have something in mind?
What kind of information is missing or hard to find?

Let me know if it solves your problem,

May 3, 2016 at 10:01 AM

1: Thank you, I will look into --cover_children.
2: I did not find any cobertura to lcov tool. That is the only thing that is bothering me currently, I want a report similar to lcov but I am not able to get the same. I can export to xml and write my own tool to convert it, but that's a lotta effort and my current bandwidth dosen't allow me to put that effort. :) So I would really appreciate it if you could give me some pointers
3: I think the report given by gcov->lcov-genhtml (screenshot in original message) is comprehensive and solves all reporting requirements. It is aggregated by folder, file etc. Do you think it would be worthwhile to give a format like that?

About documentation, we'll take it up once I am done with implementing OpenCppCoverage for our company. :)

May 8, 2016 at 2:26 PM

I have had a look at lcov format quickly. Is your need to generate a file .info (With FN, FNDA, FNF..) from OpenCppCoverage? It can be a new feature for the next version if the file format is quite simple to support (as cobertura is).

PS: I cannot see your initial screenshot. It seems you cannot attach a file to a discussion unlike for issues. Can you send me the screenshot directly by email.

Hope that help,

Marked as answer by OpenCppCoverage on 8/20/2016 at 8:08 AM