See this
discussion to have an example of command line to run OpenCppCoverage with VS unit test framework.

Unfortunately, we discovered a bug and you will probably have an empty coverage (You can read the last message of this
discussion for more information). I am working on the fix and plan to create a new release in a few days.
I will add a message to this discussion.

Coproc, actually you might want to try
https://github.com/atlaste/VSOpenCPPCoverage . It automatically handles all the command line stuff from vstest, which is a pain imho. It doesn't solve the bug that is mentioned here though.