MBUnit テスト スイートを Team City で何日も動作させようとしてきましたが、成功しませんでした。
私の解決策は問題ありません。プログラムは私のテストです。チームシティとのガリオの統合についてグーグルで調べた後、私はこれを機能させるために多くの方法を試しました。私は近いと思いますが、助けが必要です.
ガリオの bin ディレクトリをリポジトリと TC サーバーに含めました。
Team City で設定したビルド ランナーは次のとおりです。
ビルド ランナー: MSBuild ビルド ファイル パス: Myproject.msbuild ターゲット: RebuildSolution RunTests
これは、私が作成してソース管理トランク ディレクトリに含めた Myproject.msbuild ファイルです。
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This is needed by MSBuild to locate the Gallio task -->
<UsingTask AssemblyFile="C:\Gallio\bin\Gallio.MSBuildTasks.dll" TaskName="Gallio" />
<!-- Specify the tests assemblies -->
<ItemGroup>
<TestAssemblies Include="C:\_CBL\CBL\CoderForTraders\Source\trunk\UnitTest\DomainModel.Tests\bin\Debug\CBL.CoderForTraders.DomainModel.Tests.dll" />
</ItemGroup>
<Target Name="RunTests">
<Gallio IgnoreFailures="false" Assemblies="@(TestAssemblies)" RunnerExtensions="TeamCityExtension,Gallio.TeamCityIntegration">
<!-- This tells MSBuild to store the output value of the task's ExitCode property into the project's ExitCode property -->
<Output TaskParameter="ExitCode" PropertyName="ExitCode"/>
</Gallio>
<Error Text="Tests execution failed" Condition="'$(ExitCode)' != 0" />
</Target>
<Target Name="RebuildSolution">
<Message Text="Starting to Build"/>
<MSBuild Projects="CoderForTraders.sln"
Properties="Configuration=Debug"
Targets="Rebuild" />
</Target>
</Project>
Team City によって表示されるエラーは次のとおりです。
エラー MSB4064: 「Assemblies」パラメーターは「Gallio」タスクではサポートされていません。パラメータがタスクに存在し、それが設定可能なパブリック インスタンス プロパティであることを確認します
エラー MSB4063: 入力パラメーターで「Gallio」タスクを初期化できませんでした。
ご協力いただきありがとうございます