Strange Error in nunit runner on TC v6

TC Version: Enterprise 6. (15772)
VCS: TFS 2008
Agent OS: Windows Server (32bit)
db: Sql server 2008

We are looking to upgrade to 6 from 5.1.2.
So to test, we made a copy of our TC database and then copied the TC settings over. verified that all the builds ran correctly. Then ran the 6.0 install/update. Install ran fine, The one agent we are using for testing upgraded fine.
However we now get the following error on any nunit build:

[Step 2/2] Error while running NUnit tests from assembly E:\BuildAgent\work\aa7904aa81d1de5f\Libraries\Tests\IDT.Sherman.Manufacturing.Tests\bin\Debug\IDT.Sherman.Manufacturing.dll: Unable to find assembly 'IDT.Data, Version=1.0.1.567, Culture=neutral, PublicKeyToken=null'.
Check correct .NET Framework version and process platform (x64, x86, MSIL) are used both in the test runner settings and involved assemblies on this machine.
[14:14:01]: [Step 2/2] NUnit Error: System.Runtime.Serialization.SerializationException: Unable to find assembly 'IDT.Data, Version=1.0.1.567, Culture=neutral, PublicKeyToken=null'.


The specified dll is in the location specified in the error message and is the right version.
This error is thrown as soon as the first nunit test is started and then repeatedly thrown for every test assembly.
The interesting thing is that the runner continues on and actually processes all the tests in those assemblies correctly (63: ignored, 457: passed).
So it seems to me that this maybe an incorrect error.

Anyone have any ideas on how to get by this?

7 comments
Comment actions Permalink

Please check .NET Framework version and bitness (i.e. x86 or x64) were selected right. The same error message may be caused by COM/native references that were failed to be resolved.

How do you run NUnit tests?

0
Comment actions Permalink

Project:
  Target Framework .net 4
  Platform Any CPU

nunit .net runtime set to auto, version 4

I've tried both the nunit 2.5 and 2.5.8


There is no COM code involved in the tests or the projects.

The assembly that the error message says it cannot find (IDT.Data) is also targeted at .net4 any cpu.

I just verified that by running corflags on it and geting
PE: PE32

32BIT: 0

I have the nunit runner set up as the second build step. The first was to build the project with the vs 2010 runner.


Our production TC server builds this fine using nunit 2.5 as part of the vs 2010 build runner.



Attachment(s):
Nunit build step.png
0
Comment actions Permalink

Please check the lost assembly is available in the tests assemblies folder. Try running it under x84 locally.
Could you try if the tests run on the build on the build agent machine under the same account on the same folder.

0
Comment actions Permalink

It appears to be an issue in how the test dlls are designated.
In the Run Tests from entry,
If I use .\Libraries\Tests\**\*.dll
I get the error.
However if I specify the test dlls like

.\Libraries\Tests\IDT.Sherman.Manufacturing.Specifications.Tests\bin/Debug\IDT.Sherman.Manufacturing.Specifications.Tests.dll
.\Libraries\Tests\IDT.Sherman.Manufacturing.Calculations.Tests\bin\Debug\IDT.Sherman.Manufacturing.Calculations.Tests.dll

Everything works fine

0
Comment actions Permalink

Hi

With ** wildcard NUnit may be started for files in \obj\ directory and fail the same way. I don't see it the error you provided, but try to add Libraries\Tests\**\obj\debug\*.dll to exclude list.
If that doesn't help, please post a full build log - here or to teamcity-feedback[]jetbrains.com

Thanks.
Michael

0
Comment actions Permalink

Getting the same error.
I attached the complete log.

thanks
Eric



Attachment(s):
Sherman_Library_Build_And_Test_951.log.zip
0
Comment actions Permalink

We found several related exceptions in NUnit tests run.

https://bugs.launchpad.net/nunit-3.0/+bug/494119
http://groups.google.com/group/nunit-discuss/browse_frm/thread/ecb17f5fec81589f/edaa45d36fbed387
Please check if this applies to your case.

Does the tests on Libraries\Tests\IDT.Sherman.Manufacturing.Tests\bin\Debug\IDT.Core.UnitTesting.dll

passes on the build agent machine from the same folder under the same user account in NUnit-Console.exe

I also noticed, you collect .NET Code Coverage information. Could you please try running the build without .NET coverage.

Please disable 'Run Recently Failed Tests First' feature.
0

Please sign in to leave a comment.