Unit Test runner fails, but should succed (Same test succeds in NUnit GUI)

Hi to All

I run this test: (MatchType)


[ExpectedException(typeof(ArgumentException), ExpectedMessage = "invalid", MatchType = MessageMatch.Contains)]
public void TestSucceedsWithSpecifiedExceptionTypeAndContainsMatch()
{
throw new ArgumentException("argument invalid exception");
}

If run this within IDE, using latest Resharper 3.1.601 if fails with:

"Expected exception message: invalid
got: argument invalid exception"

If I run this with NUnit GUI testrunner it succeds as the specification requires.

More info:
- I use the latest stable 2.2.8
- I deleted all old version nunit.framework.dll from my disk, including GAC
- I installed the new 2.2.8 nunit.framework.dll to the GAC
- I copied also this dll to R# bin dir
- I monitored file access with filemon during test sessions and it seems that the correct dll loaded by resharper.

Any thougths?

6 comments
Comment actions Permalink

R

  1. 3.1 uses an old nUnit test-runner which doesn't support that exception-contains stuff.


(Actually, I didn't think 2.2.8 would have supported it, but I must be wrong on that)

I think 4.0 is getting an up-to-date test runner.

Will

0
Comment actions Permalink

Hello Will,

Actually, we cannot use nUnit runner due to licensing limitations. So we
have own implementation, which supports only primitive subset of nUnit features.
It is not going to change in ReSharper 4.

I must say, that mbUnit and xUnit authors are doing it right. They develop
ReSharper plugins for their frameworks themselves and communicate with us
when they need something from our side. We are going to improve API in ReSharper
4 in few ways to enable more features of these test frameworks. But we are
not going to support more nUnit features. It would be very nice if nUnit
guys were to develop ReSharper plugin to support full set of nUnit features.
We can't force them to do so, obviously.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


WD> R# 3.1 uses an old nUnit test-runner which doesn't support that
WD> exception-contains stuff.
WD>
WD> (Actually, I didn't think 2.2.8 would have supported it, but I must
WD> be wrong on that)
WD>
WD> I think 4.0 is getting an up-to-date test runner.
WD>
WD> Will
WD>


0
Comment actions Permalink

Hi Will,

Thx for your answer. You are right. I missed the versions. 2.2.8 was the original old wat I've used and now had done an upgrade to 2.4.6.

2.2.8 has no support for contains stuff, and 2.4.6 has.

horo

0
Comment actions Permalink

Hi Ilya,

Thx for your detailed answer.
I was wrong when supposed that nunit.framework do the job and R# runner displays the exceptions. Anyway:

Which one testing framewok is recommended, from th point of view R# test runer integration?

thx for answers

0
Comment actions Permalink

Hello horo,

We are using nUnit and then we have our own framework which runs on top of
it. I didn't evaluate any other frameworks recently, so I cannot suggest.
I think you can go to ALT.NET and ask :) You can find links to various resources
here: http://altnetpedia.com/

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> Hi Ilya,
IR>
IR> Thx for your detailed answer.
IR> I was wrong when supposed that nunit.framework do the job and R#
IR> runner displays the exceptions. Anyway:
IR> Which one testing framewok is recommended, from th point of view R#
IR> test runer integration?
IR>
IR> thx for answers
IR>


0
Comment actions Permalink

Hi Ilya,

thx for your answer.

horo

0

Please sign in to leave a comment.