I'm currently using the sln2008 runner. Is ther开发者_运维百科e a way to configure TeamCity to execute MSpec tests without switching to a NAnt or MSBuild runner?
I've never done it, but you could probably add a post build Exec task that just shelled out to mspec.exe. Just throw the code from my answer linked to above (How to integrate MSpec with MS Build?) in your specs csproj and add DependsOnTargets="RunSpecs" to your AfterBuild target:
<Target Name="RunSpecs">
<PropertyGroup>
<MSpecCommand>
lib\machine\specifications\Machine.Specifications.ConsoleRunner.exe $(AdditionalSettings) path\to\your\project\bin\Debug\Your.Project.Specs.dll path\to\your\other\project\bin\Debug\Your.Other.Project.dll
</MSpecCommand>
</PropertyGroup>
<Message Importance="high" Text="Running Specs with this command: $(MSpecCommand)"/>
<Exec Command="$(MSpecCommand)" />
</Target>
<Target Name="AfterBuild" DependsOnTargets="RunSpecs">
</Target>
You may use msbuild runner. Please see How to integrate MSpec with MS Build? for description on how to integrate msbuild and mspec
精彩评论