NUnit failed to load in TFS build

荒凉一梦 提交于 2019-12-20 02:56:20

问题


I’m having a "build partially succeeded" issue with this error “NUnit failed to load e:\Builds\184\CSTax\706USServices_Test\bin\Calc.Tests.dll”, but all of the unit test in this project ran and passed (all green).

Build environment

1) Using NUnit 2.6.4 and NUnit Test Adapter 2.0.0

2) TFS 2013 – upgraded from 2012

3) Visual studio 2012 and 2013 have been installed on the server

4) I did install the NUnit Test Adapter, using the Extensions and Updates in 2013 Visual Studio

5) Using build process templates from TFS 2012, even if I switch to the 2013 default build process templates I get the same error

6) I tried changing the project to copy the nunit references locally (including the test adapter), they did make it to the bin folder, but still fails

7) I used process monitor to see if I could find the failure, everything looked good, the dlls were copied from the packages folder to the bin folder and loaded.

I’m sure it has to be something in our build environment, but I do not know where to look, I need my builds to go green. Any ideas?


回答1:


The issue is a bug in the NUnit 3.0 test adapter, I removed our E2E project off of the build server and all my builds went green. NUnit is looking into this bug.




回答2:


You need to:

  1. Download the NUnit test adapter: https://visualstudiogallery.msdn.microsoft.com/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d . Rename the NUnitVisualStudioTestAdapter-2.0.0.vsix to NUnitVisualStudioTestAdapter-2.0.0.zip. Unzip NUnitVisualStudioTestAdapter-2.0.0.zip.
  2. Check in the following dlls: nunit.core.dll, nunit.core.interfaces.dll, nunit.util.dll and NUnit.VisualStudio.TestAdapter.dll into a folder in TFS Version Control.
  3. Specify the build controller's path to custom assemblies:
  4. Then queue a build, the NUnit test methods will be run.

Also have a check on the Enable a third-party unit framework part of this MSDN article for the details: https://msdn.microsoft.com/en-us/library/vstudio/ms253138.aspx



来源:https://stackoverflow.com/questions/33240704/nunit-failed-to-load-in-tfs-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!