开发者

Running nUnit from code generated by msBuild out of Jenkins

开发者 https://www.devze.com 2023-03-05 13:16 出处:网络
My company is moving to continuous integration using Jenkins. We keep ou开发者_C百科r code in Subversion.

My company is moving to continuous integration using Jenkins. We keep ou开发者_C百科r code in Subversion. We code in C# (well I do, the others use php).

I've hit a snag, I can't get nUnit to work when I compile the project .

My project is a very simple one with just a single class and a few nUnit tests. Works fine in Visual Studio. It builds and I can run the NUnit console to test the code.

I can use Jenkins to extract the project from Subversion I can then build the code with msBuild. However, when I try to run NUnit from the the NUnit console I get told that nunit.framework.dll is missing.

nunit.framework.dll is in C:\Program Files (x86)\NUnit 2.5.10\bin\net-2.0\framework

I think it is looking for the nunit.framework.dll that is referenced by the project. Which is required to add NUnit tests to the project.

I note that when building from Visual Studio nunit.framework.dll is copied to the bin folder. I note that no contents of bin are stored in Subversion. I had to put a copy of nunit.framework.dll into C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\Profile\Client so that msBuild could find it.

How do I get nunit.framework.dll into the output bin folder when using Jenkins and msBuild?

I've looked through a number of posts but non address this point.

Any thoughts would be welcome. Thanks, Richard


In your Test project where you reference the Nunit.Framework.dll, right click on that and select properties ( or press Alt + Enter ) and make Copy Local to be True

Running nUnit from code generated by msBuild out of Jenkins


Subversion does not store output files ( i.e. dlls) by default. I rebuilt the project and added nunit.framework.dll to subversion. That way it gets popped out by Jenkins and can subsequently be referenced.

0

精彩评论

暂无评论...
验证码 换一张
取 消