Friday, 26 February 2016

OpenCover Installation

About OpenCover:

            Opencover is a code coverage tool. Which shows % coverage and also the code which is not        covered in the tests. 

Installation Procedure:

  1.  Install the OpenCover console https://github.com/opencover/opencover/releases
  2. Install the OpenCover VisualStudio extension https://visualstudiogallery.msdn.microsoft.com/6950a046-8919-4935-8542-c6f37956f688/view/Discussions
  3.   After restarting Visual Studio click Tools -> Options -> Find OpenCover.UI Options and change OpenCover path to the install location of OpenCover console – my path is C:\Users\raghu\AppData\Local\Apps\OpenCover\OpenCover.Console.exe
  4. You should have a menu now in Visual Studio called “OpenCover”, click that menu and click “OpenCover test explorer”
  5.    Click the refresh icon in the upper left hand corner of the test explorer, this should show all the tests.                                                     
  6.   Highlight all the tests -> right click -> cover with OpenCover (wait for a bit, there is no loading screen it just freezes)
  7.  You should now have an “OpenCover Results” window, and your code should have green or red dots next to each line.

Please feel free to comment if you need any more information.




No comments:

Post a Comment