문제

please tell me how to run nunit with msbuild. I am using TFS for code integration and VS2010 .

도움이 되었습니까?

해결책

You probably want to integrate NUnit with TFSBuild and not MSBuild since you are using Team Foundation Server.

You will need MSBuild tasks to be able to run NUnit as explained in the three following tutorials:

The easiest way is to use the MSBuild Community Tasks where you already have a NUnit task ready to be used and you only will need to add a target to your msbuild file like so:

<Target Name="RunTests">  
    <!-- Run Unit tests -->  
    <CreateItem Include="$(OutDir)*.Tests.dll">  
      <Output TaskParameter="Include" ItemName="TestAssembly" />  
    </CreateItem>  
    <NUnit ToolPath="..\Tools\NUnit" DisableShadowCopy="true" Assemblies="@(TestAssembly)" />  
  </Target>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top