Frage

Vor ein paar Tagen sah ich einen BDD Screencasts von Rob Conery . Im Video zeigte er, wie benutzen MSpec , so habe ich heruntergeladen es und spielte mit den Bits. Was ich will, ist jetzt zu integrieren MSpec mit MS bauen, aber ich weiß nicht, wie ... ich benutze TFS Team Build als meinen CI-Server - können Sie mir helfen, eine href zur Integration <= "http://codebetter.com/blogs/aaron. jensen / Archiv / 2008/09/02 / MSpec-v0-2.aspx“rel = "noreferrer"> MSpec mit MSBuild?

Danke!

War es hilfreich?

Lösung

Im Moment ist der einfachste Weg, um es einfach Exec.

 <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>

Edit: Hinweis Weitere Einstellungen können Sie in das Ziel wie folgt aufrufen:

    <MSBuild Projects="yourmsbuild.msbuild" Targets="RunSpecs" Properties="AdditionalSettings=-s -t -i &quot;web&quot; --html Specs\Specs.html"/>

Wenn Sie passieren --teamcity als Argument gibt es spezifische Teamcity Protokolldaten so wird Teamcity Ihre Tests verfolgen.

Machine.Specifications
Copyright (C) 2007, 2008

Usage: mspec-runner.exe [options] <assemblies>
Options:
  -i, --include     Executes all specifications in contexts with these comma delimited tags. Ex. -i "foo,bar,foo_bar"
  -x, --exclude     Exclude specifications in contexts with these comma delimited tags. Ex. -x "foo,bar,foo_bar"
  -t, --timeinfo    Shows time-related information in HTML output
  -s, --silent      Suppress console output
  --teamcity        Reporting for TeamCity CI integration.
  --html <PATH>     Outputs an HTML file(s) to path, one-per-assembly w/ index.html (if directory, otherwise all are in
one file)
  -h, --help        Shows this help message
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top