가장 쉬운 방법은 바로 실행하는 것입니다.
<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>
편집 : 공지 사항 추가 설정, 당신은 다음과 같은 목표로 호출 할 수 있습니다 : 인수로 --teamcity 전달하는 경우 인 TeamCity는 테스트를 추적 할 수 있도록
<MSBuild Projects="yourmsbuild.msbuild" Targets="RunSpecs" Properties="AdditionalSettings=-s -t -i "web" --html Specs\Specs.html"/>
그것은 인 TeamCity 특정 로그 데이터를 출력 . 당신은 NAnt 사용 인수 라인 = "assembly1의 assembly2"로이 일을하지 않을 때 인수 값 (그렇지 않으면 당신은 매우 비 분명 멋진 오류가 발생합니다) 것을
는
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
주 – Neal