开发者

TeamCity and running NUnit tests

In TeamCity, i need to sta开发者_StackOverflow中文版te exact locations of assemblies that contain NUnit tests to be executed.

Is there an option to state a .SLN file so it will look up these test projects dynamically?


You can use wildcard expressions in the Run tests from box:

Source\\**\bin\\**\*Tests.dll

The above would run tests from any assembly under any bin folder under the Source folder which contains 'Tests' at the end of the assembly name.


Depending on whether you're using MSBuild or NAnt, you can add an entry to your build script like this:

<ItemGroup>
  <TestAssemblies Include="tests\\test*.dll"/>
  <TestAssemblies Include="tests.lib\\test*.dll"/>
</ItemGroup>

<Target Name="runTests">
  <Exec Command="$(teamcity_dotnet_nunitlauncher) v2.0 x86 NUnit-2.5.0 %(TestAssemblies)" />
</Target>

In the example above, the two TestAssemblies lines point to your assemblies.

You can read more about this here: http://blogs.jetbrains.com/teamcity/2008/09/24/using-teamcity-nunit-launcher/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜