NUnit tests in recent version

Running of NUnit tests was broken in VS2005 for several recent versions. Actually, I was not able to run them after ReSharperSetup.5.1.1721.11. Today I tried ReSharperSetup.5.1.1729.9 with the same negative result. Some observations:
1. Resharper is able to run tests, which are located directly in TestFixture classes. It ignores inherited tests. Such tests are marked "pending" during the run and have no status (grey circle) after it.
2. For some reason Resharper's Bin folder has nunit.framework.dll from NUnit 2.5.5 and others from NUnit 2.5.2.

I tried to replace files to make all of them NUnit 2.5.2, but it didn't change the result. I tried to copy files from NUnit 2.5.5, which generated a runtime error on attempt to run tests.

I hope my 2 cents will help to solve the problem somehow, because I see similar complains from other people.

Thanks in advance!

7 comments
Comment actions Permalink

Hello Igor

     In order to change the version of NUnit used by ReSharper open ReSharper | Options | Unit testing, select 'NUnit' provider and point ReSharper to your NUnit 2.5.5 installation. Let me know if this helps. Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Hi Andrey,

I didn't have NUnit installed because Resharper used to be able to work with tests without it, so I ran NUnit-2.5.2.9222.msi. After that I went to Resharper -> Options -> Unit Testing and selected NUnit Provider. Switched the radiobutton to "Specified NUnit installation" and put "C:\Program Files\NUnit 2.5.2" there. It didn't work because actually Resharper expects not an installation folder, but the one, which has "lib" subfolder, so I changed the path to "C:\Program Files\NUnit 2.5.2\bin\net-2.0". Tried to run tests and got error dialog box:

Unit Test Runner failed to load test assembly:
JetBrains.ReSharper.TaskRunnerFramework.TaskException: Compiler executable file csc.exe cannot be found

Any suggestions?

Thanks!

0
Comment actions Permalink

Hello Igor,

Could you please check if this happens with NUnit 2.5.5 as well? Thank you!

Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hi Andrey,

I didn't have NUnit installed because Resharper used to be able to
work with tests without it, so I ran NUnit-2.5.2.9222.msi. After that
I went to Resharper -> Options -> Unit Testing and selected NUnit
Provider. Switched the radiobutton to "Specified NUnit installation"
and put "C:\Program Files\NUnit 2.5.2" there. It didn't work because
actually Resharper expects not an installation folder, but the one,
which has "lib" subfolder, so I changed the path to "C:\Program
Files\NUnit 2.5.2\bin\net-2.0". Tried to run tests and got error
dialog box:

Unit Test Runner failed to load test assembly:
JetBrains.ReSharper.TaskRunnerFramework.TaskException: Compiler
executable file csc.exe cannot be found
Any suggestions?

Thanks!

---
Original message URL:
http://devnet.jetbrains.net/message/5268152#5268152



0
Comment actions Permalink

Hi Andrey,

I uninstalled NUnit 2.5.2 and installed NUnit-2.5.5.10112.msi. Changed the path in Options to "C:\Program Files\NUnit 2.5.5\bin\net-2.0". My unit tests were using NUnit 2.5.2 framework, so I changed referenced assemblies to 2.5.5 and recompiled the solution. After that I tried to run tests. The result is the same as before - I have a dialog box with:

Unit Test Runner failed to load test assembly:
JetBrains.ReSharper.TaskRunnerFramework.TaskException: Compiler executable file csc.exe cannot be found.

I hope it helps somehow.

Thanks!

0
Comment actions Permalink

I decided to continue research. First of all I reverted to ReSharperSetup.5.1.1721.11, which is the last known version that works with NUnit tests. Well, it worked right out of the box. The interesting thing is that in Option it says "NUnit 2.5.5 provided with ReSharper" in opposite to "2.5.2" in ReSharperSetup.5.1.1729.9.

I changed the path in Option to "C:\Program Files\NUnit 2.5.5\bin\net-2.0". Trying to run tests I got an error dialog box:

Unit Test Runner failed to load test assembly:
JetBrains.ReSharper.TaskRunnerFramework.TaskException: Value cannot be null.
Parameter name: path1

I uninstalled NUnit-2.5.5.10112 and installed NUnit-2.5.2.9222. After that I changed the path to "C:\Program Files\NUnit 2.5.2\bin\net-2.0" in Option. Tests failed with the same "Parameter name: path1" error dialog box.

Conclusions:
1. Version ReSharperSetup.5.1.1721.11 of ReShaper had valid embedded NUnit 2.5.5, which worked without any problems. For some reason, it was downgraded to NUnit 2.5.2 in next versions. This change broke running of tests using the embedded NUnit and was never fixed. Besides the setup installs mixed NUnit assemblies from 2.5.2 and 2.5.5 as I reported in the first message.
2. In parallel it was an attempt to use external to ReSharper NUnit installations. This functionality had a bug in ReSharperSetup.5.1.1721.11. It was improved in next releases but still incomplete and flawed.

I would suggest to revert the implementation of the embedded NUnit to the one in ReSharperSetup.5.1.1721.11 and keep it 2.5.5. If there is a plan to retire embedded NUnit in favor of external NUnit installations then could you, please, maintain it functional at least until external NUnit bridge is mature enough?

Thanks!

0
Comment actions Permalink

Hello Igor,

You're right, ReSharper 5.1.1721.11 did use NUnit 2.5.5, but we've had to
go back to NUnit 2.5.2 because of the other bug in v2.5.5. At the moment
we're waiting for NUnit to release a new version which fixes those bugs.
We will look into the problem with 'Compiler executable file csc.exe cannot
be found' error as well. The "Parameter name: path1" problem is fixed in
ReSharper 5.1.1729.9.msi. Thank you!

Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I decided to continue research. First of all I reverted to
ReSharperSetup.5.1.1721.11, which is the last known version that works
with NUnit tests. Well, it worked right out of the box. The
interesting thing is that in Option it says "NUnit 2.5.5 provided with
ReSharper" in opposite to "2.5.2" in ReSharperSetup.5.1.1729.9.

I changed the path in Option to "C:\Program Files\NUnit
2.5.5\bin\net-2.0". Trying to run tests I got an error dialog box:

Unit Test Runner failed to load test assembly:
JetBrains.ReSharper.TaskRunnerFramework.TaskException: Value cannot be
null. Parameter name: path1

I uninstalled NUnit-2.5.5.10112 and installed NUnit-2.5.2.9222. After
that I changed the path to "C:\Program Files\NUnit 2.5.2\bin\net-2.0"
in Option. Tests failed with the same "Parameter name: path1" error
dialog box.

Conclusions:

1. Version ReSharperSetup.5.1.1721.11 of ReShaper had valid embedded
NUnit 2.5.5, which worked without any problems. For some reason, it
was downgraded to NUnit 2.5.2 in next versions. This change broke
running of tests using the embedded NUnit and was never fixed. Besides
the setup installs mixed NUnit assemblies from 2.5.2 and 2.5.5 as I
reported in the first message.

2. In parallel it was an attempt to use external to ReSharper NUnit
installations. This functionality had a bug in
ReSharperSetup.5.1.1721.11. It was improved in next releases but still
incomplete and flawed.

I would suggest to revert the implementation of the embedded NUnit to
the one in ReSharperSetup.5.1.1721.11 and keep it 2.5.5. If there is a
plan to retire embedded NUnit in favor of external NUnit installations
then could you, please, maintain it functional at least until external
NUnit bridge is mature enough?

Thanks!

---
Original message URL:
http://devnet.jetbrains.net/message/5268263#5268263



0
Comment actions Permalink

Hi

I also had the same problem which I resolved by providing a reference to nunit.core and nunut.core.interfaces as well as to nunit.framework. Previously I only had nunit.framework referenced (which had worked fine with all previous builds).


Presently running 5.1.1729.9 together with Nunit 2.5.5.10112 without any problems. Well - that's not strictly true - previously tests would refuse to run if the build failed - now they use the last good build - which means that I'm sometimes looking at the wrong test results!



Regards
Jeremy
0

Please sign in to leave a comment.