puzzling unit test behavior


I have been using resharper as my test runner for nunit and vs test system tests.

However, I recently returned to a project that I had deployed before I begun re-using resharper regularly. (arrgh)

This project uses vs team test system tests.

The assembly under test contains code that checks for associated assemblies within the operating folder of the assembly under test.

Surprizingly, the check could not locate the associated assemblies despite the fact that the bin folder of the test project contained all the items needed.

I discovered that the resharper test runner was executing the test against a copy of the assembly under test in a tmp folder under AppData/Local in my logged-in user folder.

Only the assembly instantiated within the unit test was being copied to that location. the other needed assemblies were not being copied.

This is occurring despite the fact that there are [DeploymentItem] attributes in place.

When I run the tests using the vs team test sysem test view/runner, everything works as expected.

Should I not expect that resharper would using the vs team test convention of placing all the items to be tested in a subfolder of the project called 'TestResults'?



Andrey Serebryansky
Comment actions Permalink

Hello Kimball
     Try turning off the 'Shadow-copy assemblies being tested' option under ReSharper > Options > Unit Testing. Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc


"Develop with pleasure!"

Comment actions Permalink

That worked!

Thanks, Andrey.


Please sign in to leave a comment.