Running xUnit.net tests in dotCover 2.0 EAP

by Matt 18. April 2012 10:03

JetBrains recently released an EAP of dotCover 2.0. Up until now, dotCover required ReSharper to enable code coverage of unit tests – it integrated itself nicely in the ReSharper menus and UI, and would provide a coverage analysis of the code executed during a test run.

dotCover

Starting with this 2.0 EAP, you no longer need ReSharper installed. DotCover provides support for its own test runner and test runner plugins. In fact, it comes bundled with a port of the unit test support and framwork from ReSharper, so you won’t actually be able to tell the difference.

Which means, of course, a new build of xunitcontrib to provide support for dotCover. This is a separate release to the ReSharper support – while the products have (pretty close) source code compatibility, there isn’t (yet?) binary compatibility.

Installation instructions are as simple as for the ReSharper plugin:

  1. Make sure you UNBLOCK the downloaded zip file (right click –> properties –> Unblock).
  2. MAKE SURE YOU UNBLOCK THE DOWNLOADED ZIP FILE (just checking)
  3. Extract the zip and copy the xunitcontrib.runner.dotcover folder into C:\Program Files\JetBrains\dotCover\v2.0\bin\plugins (you will probably need to create the plugins folder)
  4. Restart Visual Studio.

Once installed, xUnit.net tests should be recognised, and you should now be able to run, debug and cover xunit tests.

Note that you DO NOT NEED this plugin if you have ReSharper (and the appropriate xunitcontrib version) installed. By default, dotCover still integrates with ReSharper, if it’s available.

If, however, you want to see what all the fuss is about, you can disable ReSharper’s unit test implementation, and use dotCover’s. Simply go to the ReSharper –> Options –> Unit Testing, uncheck “Enable Unit Testing”, and then go to the dotCover –> Options –> ReSharper Integration and uncheck “Hide all actions and tool windows related to unit tests in dotCover and use ReSharper’s implementation”. You will now be using the dotCover unit test implementation.

It’s going to look very familiar.

dotCover-TestRunner

(And don’t forget to check out the “Colour Scheme” options if you’ve customised your Visual Studio colours. “Dark” makes SUCH a difference)

dotCover-Coverage

Tags: , ,

Comments (10) -

360storage
360storage United States
5/18/2015 2:59:55 PM #

After reading your article and the ideas presented this piqued my interest. I have never been so intrigued with this subject before, but your writing style has renewed my interests. Thank you for posting this.

Reply

Maria Robinett
Maria Robinett United States
1/6/2016 2:42:01 PM #

getting laid AWSOME

Reply

Virgilio Schoel
Virgilio Schoel United States
1/15/2016 4:21:08 AM #

Congratulations, Neil! I love this site and I know I'll love the book. Christmas, birthdays, Father's Day 2010  check!

Reply

Mitch Groene
Mitch Groene United States
1/15/2016 4:34:16 AM #

I love the dolphin saving you one.

Reply

Russell Schlappi
Russell Schlappi United States
1/15/2016 4:58:07 AM #

Hey, congratulations Neil. This site really is something special and it's been a pleasure to share it with my readership too. Looking forward to future awesome things, and I'll send any suggestions that are sufficiently awesome.

Reply

Antony Goren
Antony Goren United States
1/15/2016 6:39:25 AM #

this is awesome like the book of awesome

Reply

Janean Finkelson
Janean Finkelson United States
1/15/2016 7:51:01 AM #

Congrats. And all of the items featured so far should be in the book.

Reply

Terrell Sabel
Terrell Sabel United States
1/15/2016 8:20:33 AM #

Printing out an essay or paper, reading the first line and realizing there aren't any mistakes.<br />AWESOME!

Reply

Thersa Tomich
Thersa Tomich United States
1/15/2016 8:27:49 AM #

Printing out an essay or paper, reading the first line and realizing there aren't any mistakes.<br />AWESOME!

Reply

Coy Dreger
Coy Dreger United States
4/21/2016 10:27:23 AM #

Thanks for your time so much for send this important info. This is the highest quality possibility for enjoyment. These are one of the finest game & anybody can fully enjoy with your games. Because i am also play these games. Pray so these games have a positive response and have a good feedback at the same time.</p><p>I spend a long time because of type of games. Finally, Before some days I have been installed. SoftMozer is actually a free applicaion downloading site offering

Reply

Add comment

biuquote
  • Comment
  • Preview
Loading

Rel=Me

Month List

RecentComments

Comment RSS