Using ReSharper integration

Jan 3, 2011 at 6:51 AM

Even though ReSharper allows to load NUnit plugins, i couldn't get selenium toolkit to work...

 

Is this actually supported?

 

Thx

Coordinator
Jan 3, 2011 at 3:31 PM

Thanks for your message, I am actively researching the ReSharper integration story and it appears that there are a few options.  The critical part about the integration is that the test-runner must provide an extension point for when the testrun starts and finishes in order to control the Selenium Remote Control host.   If you find a working ReSharper integration, I would love to hear how you achieved it.

Honestly, I wasn't aware that ReSharper natively supported loading NUnit addins.  This may be true, but after some cursory googling I haven't found any concrete evidence to support this.  If it is supported, the SeleniumToolkit.NunitAddin.dll would need to be deployed somewhere within ReSharper's folder structure so that the Test-Runner can load it.  I am not certain which version of NUnit the native ReSharper test-runner uses, nor where the addins would need to be deployed.  Suffice to say, I haven't tried this option and further research is required.  If they are supported natively, this is the best option, so if anyone knows I'd love to hear from you.

According to this link, there is a way to configure ReSharper to use NUnit natively.  This option would be the best for the immediate term as it wouldn't require any code changes.  I haven't tried this because my ReSharper license is currently expired (ReSharper has provided a free license to open source projects in the past, I am waiting on my renewal (hey guys, you rock!)).

Another option I am pursuing is a Selenium Toolkit MbUnit adapter.  This option would allow WebFixtures to run under the MbUnit stand-alone runner and the ReSharper MbUnit addin.  The only drawback to this approach for ReSharper integration is that users will need to install Gallio/MbUnit before installing the toolkit.  

Lastly, the other option I'm considering is writing my own ReSharper addin.  This option is kinda hairy but it is the only option where users aren't required to change their ReSharper configuration or install additional prerequisites.

How are you trying to configure ReSharper for your tests?

Jan 3, 2011 at 3:39 PM

ReSharper is currently using v2.5.3 of NUnit ( but i tried it with a newer version also.. )... As u can see in the attached screenshot, ReSharper is already aware of NUnit plugins an expects them in it's own folder ( btw. i tried every imaginable folder-combination already with no outcome ^^ )

 

http://img402.imageshack.us/img402/4692/resharpvs2010.png

 

So the I'd have guessed this was going to work without extra effort.. bad luck so far :(

Coordinator
Jan 3, 2011 at 6:12 PM

What have you tried?

From some reverse engineering of the JetBrains.ReShaper.UnitTestProvider.nUnit.dll and what I know about NUnit, it looks for a folder called "addins" in the folder of the executing process.  Based on this I would expect:

  1. Create the "addins" folder under ReSharper's Bin folder.
  2. Copy _ProgramFiles_\Selenium Toolkit\bin\nunit\2.5.3\SeleniumToolkit.NUnitAddin.dll to _ProgramFIles_\JetBrains\ReSharper\v5.1\Bin\addins
  3. From your png, set the "Load Addins" to "Always"

I wouldn't expect the UI to show the cool "run/debug test" icons next to each test (they're [WebFixture] not [TestFixture]) but they may appear in ReSharper's test list editors.

 

Jan 3, 2011 at 7:16 PM

Yes, tried that already, with no result...  neither in the editor nor in the testoverview...

btw. ReSharper has 30 days trial if u want to try... u can "enhance" the period by downloading trunk builds, which extend your trial-period by another 30 days...