TeamCity & MSpec with sln2008 runner?

I am currently using sln2008 runner. Is there a way to configure TeamCity to run MSpec tests without switching to the NAnt or MSBuild runner?

+2


source to share


2 answers


I've never done this, but perhaps you could add an Exec task for the post build that was just released in mspec.exe. Just strip the code from my answer linked from above ( How to integrate MSpec with MS Build? ) In your csproj specs 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>

      

+1


source


You can use runner. See How to integrate MSpec with MS Build? for a description of how to integrate msbuild and mspec



+1


source







All Articles