NUnit Addins Support
NUnit addin is an extension that plug into NUnit core and changes the way it operates. Refer to the NUnit addins page for more information. This section covers description of NUnit addins support for:
NAnt Build Runner
To support NUnit addins for NAnt build runner you need to provide in your build script the teamcity.dotnet.nant.nunit2.addins
property in the following format:
<property name="teamcity.dotnet.nant.nunit2.addins" value="<list of paths>" />
where <list> is the list of paths to NUnit addins separated by ';'.
For example:
<property name="teamcity.dotnet.nant.nunit2.addins" value="../tools/addins/MyFirst.AddIn.dll;MySecond.AddIn.dll" />
TeamCity NUnit Console Launcher
To support NUnit addins for the console launcher you need to provide the '/addins:<list of addins separated with ; >
' commandline option.
For example:
${teamcity.dotnet.nunitlauncher} /addin:../tools/addins/MyFirst.AddIn.dll;nunit-addins/MySecond.AddIn.dll
MSBuild
To support NUnit addins for the MSBuild runner, specify the Addins
property for the NUnitTeamCity
task with the following format:
Addins="<list>"
where <list>
is the list of addins separated by ';' or ','.
For example:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="build"> <ItemGroup> <TestAssembly Include="$(MSBuildProjectDirectory)/MyTests.dll" /> </ItemGroup> <Target Name="build"> <NUnitTeamCity Assemblies="@(TestAssembly)" Addins="../tools/addins/MyFirst.AddIn.dll;nunit-addins/MySecond.AddIn.dll" /> </Target> </Project>