All of my unit tests are ignored

Sep 29, 2011 at 11:09 PM

I have a solution with a couple of NUnit test projects in it, and for one of the projects the Resharper NUnit test runner marks all of the tests as ignored. The other projects in the solution run without any problem. The project that fails targets Silverlight and uses the AgUnit plugin, whereas the projects that work do not.

The same solution checked out of SVN on a different branch works just fine on the same machine.

All 1500 tests are ignored, and the tests do not have the [Ignore] attribute attached.

The only clue is that the very first time I try running the unit tests after opening the solution I get a dialog box saying "Cannot analyse project output. The file does not exist.". That is the whole message, no file paths or any other information.

I tried everything I could think of, and even re-booted the machine out of desperation. Any ideas?

 

-----------------------------------------------------------------------------------

JetBrains ReSharper 6.0 Full Edition

Build 6.0.2202.688 on 2011-06-30T04:14:16

Plugins: 1

#1. “AgUnit 0.4.2 for R# 6.0” v0.4.2.0 by “AgUnit authors - http://agunit.codeplex.com”

Visual Studio 10.0.30319.1.

Coordinator
Sep 30, 2011 at 11:52 AM

Hi kodekraft,

All tests showing up as ignored happens when the unit test run fails (it probably throws an exception).
Please follow the instructions here: http://agunit.codeplex.com/discussions/268216

One thing I've seen with NUnit in Silverlight is that there a lot of unstable ports. A lot of them just don't work with AgUnit/StatLight.
I recommend using this one: http://code.google.com/p/nunit-silverlight/

If you are still running into problems, let me know and I'll happy to help you out to find the problem :)

Greetings,

Steven

Sep 30, 2011 at 4:44 PM

Thanks for your input Steven.

In the end I uninstalled ReSharper 6 and re-installed ReSharper 5, and this immediately fixed the problem.

Martin.

Developer
Dec 7, 2011 at 3:18 AM
Edited Dec 7, 2011 at 3:19 AM

I'm getting errors with nunit. (I know this is a version of Nunit that works as I pulled it from the one StatLight uses for testing it with) :P

The project I am experiencing the issues with is at https://github.com/staxmanade/DumpToText/tree/silverlight (and the 'silverlight' branch).

I'm getting the following exception.

 

[Window Title]
ReSharper Test Runner

[Main Instruction]
Unit Test Runner failed to load test assembly

[Content]
System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.

[Expanded Information]
   at System.Reflection.Assembly._GetExportedTypes()
   at NUnit.Core.CoreExtensions.InstallAdhocExtensions(Assembly assembly)
   at NUnit.Core.Builders.TestAssemblyBuilder.Load(String path)
   at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, Boolean autoSuites)
   at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, String testName, Boolean autoSuites)
   at NUnit.Core.TestSuiteBuilder.Build(TestPackage package)
   at NUnit.Core.SimpleTestRunner.Load(TestPackage package)
   at NUnit.Core.ProxyTestRunner.Load(TestPackage package)
   at NUnit.Core.RemoteTestRunner.Load(TestPackage package)
   at JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTaskRunner.ExecuteRecursive(TaskExecutionNode node)

[^] Hide details  [OK]

 

To me it looks like the AgUnit plugin isn't even invoked for execution.

Any thoughts? Thanks.

P.S. I'm using AgUnit on a diff project (the MSTest one) and LOVING it. So happy happy joy joy!!!

Dec 22, 2011 at 5:05 PM

Confirm that I have this problem using MSUnit.

Coordinator
Dec 22, 2011 at 5:09 PM

Is that MSTest or NUnit ? I've never heard of MSUnit :)

I'll investigate the issue.

Dec 23, 2011 at 11:37 AM

Yes, sorry - MSTest. I can also confirm that the latest release works fine with Resharper 6.1 though!

Coordinator
Dec 23, 2011 at 12:19 PM

Yes, but you mean the tests running in the desktop runtime ...
That will not work in all cases.