Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to support MBUnit tests in Resharper 7

Since I upgraded to VS2012, my R#5 license was not useful anymore. After downloading the R#7.0.1 and installing I realized that MbUnit no longer had builtin support for R#7.

Since I spent some time figuring out how to get the plugin running, I will post here to save anyone else the time (And in order for myself to find it back if I need to do it again...)

like image 990
espenalb Avatar asked Oct 19 '12 21:10

espenalb


People also ask

Is dotCover included with ReSharper?

dotCover comes bundled with a unit test runner that it shares with another JetBrains tool for . NET developers, ReSharper.

How do I test code coverage in Visual Studio?

On the Test menu, select Analyze Code Coverage for All Tests. You can also run code coverage from the Test Explorer tool window. Show Code Coverage Coloring in the Code Coverage Results window. By default, code that is covered by tests is highlighted in light blue.

What is NCrunch?

NCrunch is a fully automated testing extension, engineered to make coding and testing a breeze. Forget about stopping to run your tests and let NCrunch do the work for you. Code and test at the speed you think!


1 Answers

A quick glance at the gallio source code at Gallio.ResharperRunner showed me that someone allready wrote the code. I could not find any distributions over at the Gallio Build Server, so I pulled the latest R#Runner code from SVN. (I got rev 3359) and compiled the v3\src\Extensions\ReSharper\Gallio.ReSharperRunner\Gallio.ReSharperRunner70.vs2010.csproj in VS2012.

The project was changed so that it references c:\Program Files\Gallio\bin\gallio.dll, and I also changed the Gallio.ReSharperRunner70.plugin file to "Content" and PreserveNewest (Instead of do not copy)

Then I copied the following 3 files from the debug\bin folder to C:\Users\MYUSERNAME\AppData\Local\JetBrains\DotNet\vAny\Plugins:

  • Gallio.dll
  • Gallio.ReSharperRunner70.dll
  • Gallio.ReSharperRunner70.plugin

Voila - MbUnit tests can be executed in VS2012 using Resharper 7

NB: Not sure the ResharperRunner code is 100% stable - I seem to notice some glitches, but at least my tests are again appearing in R#.

I will upload the compiled files once I figure out how to attach files to a question. Hmm - couldn't figure out how to do that, so I uploaded it to my website at http://www.albrektsen.net/Gallio.ResharperRunner70.zip

like image 83
espenalb Avatar answered Oct 21 '22 01:10

espenalb