Pregunta

Hace unos días vi un BDD screencast por Rob Connery. En el video que mostró cómo usar MSpec , por lo que he descargado y jugado con los bits. Lo que quiero ahora es integrar MSpec construir con EM, pero no sé cómo ... yo uso TFS equipo de construcción que mi servidor de CI - ¿me puede ayudar a integrar MSpec con MSBuild?

Gracias!

¿Fue útil?

Solución

En el momento de la manera más fácil es simplemente que 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>

Editar: Ajustes de notificación adicionales, que pueden poner en el blanco de esta manera:

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

Si pasa --teamcity como un argumento que da salida a los datos de registro TeamCity específico para TeamCity hará un seguimiento de sus pruebas.

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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top