开发者

TeamCity & MSpec with sln2008 runner?

开发者 https://www.devze.com 2022-12-08 16:30 出处:网络
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 prob

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

0

精彩评论

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

关注公众号