This project is read-only.

Is there a way to redirect outputs of the tested module ?

Mar 13, 2015 at 2:03 PM
Edited Mar 13, 2015 at 2:38 PM
OpenCppCoverage is a great tool, I use it to check the coverage of my google test.

I would like to be able to run and analyze my tests results in the same time the coverage is done.
For now, I have to run the test once, get and analyze its outputs (in stdout), to check my test is green, then run it a second time to measure it coverage.

Is it possible to do both coverage and analysis at the same time? (OpenCppCoverage would have to read the output of the module and redirect it to stdout)?

Kind regards,

---> forget it, I already can have my tests results outputed in a file, it is a bit less convenient than having it in Visual output pane, but it works.
Marked as answer by Fabian_Mtp on 3/13/2015 at 6:38 AM
Apr 2, 2015 at 7:13 PM
Sorry for the delay, I did not activate the notification.

OpenCppCoverage does not read output of the program, it just execute the program.

Do you want to have only the output of your program and no message from OpenCppCoverage? If yes, I can add this feature...

Now, if you only want to know if the tests are OK, you can check the exit code of OpenCppCoverage. OpenCppCoverage returns the exit code of the executed program. Most test runners return exit code equal to 0 if the tests succeeded.

Hope that help,

Aug 29, 2015 at 4:09 PM

Thanks for opencppcoverage, it's a nice easy to use coverage tool for windows! Cobertura format is great for Jenkins integration.

I believe an option for zero output from opencppcoverage would be nice to have (i.e. just the output from the unit tests) . That way it is easier to observe the output from the testing framework being used. You have implemented the "-v" option which I have found very useful when trying to figure why source was or was not being included in the reports. It would be good to have different levels of verbosity, e.g. v0, v1, v2, where v0 is no output, v1 would be current default output and v2 the full debug output.

Thanks again!
Sep 2, 2015 at 9:26 PM

You are right, it can be useful to add a flag to disable all outputs of OpenCppCoverage. I will add something like --quiet flag.
As it is easy to do, I will probably do it for the release 0.9.3:

Sep 3, 2015 at 10:25 PM
Great thanks!
Sep 9, 2015 at 9:56 PM

Quiet mode (--quiet) is available in OpenCppCoverage 0.9.3: