2010-04-09 108 views
1

今天早上我問了一個關於Gallio和Team City之間的整合問題的問題。我更改了msbuild文件以使用最新的Gallio構建腳本API使用正確的語法。謝謝你傑夫布朗,但現在當我試圖在Team City上構建應用程序時,出現以下錯誤:Gallio MbUnit和Team City問題

執行Gallio任務期間發生意外錯誤[16:19:49]:[Project「 CoderForTraders.msbuild.teamcity.patch.tcprojx」(RebuildSolution; RunTests目標(S)):] C:\ TeamCity的\ buildAgent \工作\ fa1d38b0af329d65 \ CoderForTraders.msbuild(9,9):FilterParseException:結腸預期

這裏的9號線:

<Gallio IgnoreFailures="true" Filter="Type=SomeFixture" Files="@(TestFile)"> 

,這裏是整個文件:

<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 test files and assemblies --> 
    <ItemGroup> 
     <TestFile Include="C:\_CBL\CBL\CoderForTraders\Source\trunk\UnitTest\DomainModel.Tests\bin\Debug\CBL.CoderForTraders.DomainModel.Tests.dll" /> 
    </ItemGroup> 
    <Target Name="RunTests"> 
     <Gallio IgnoreFailures="true" Filter="Type=SomeFixture" Files="@(TestFile)"> 
      <!-- 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> 

您對可能出現的問題有所瞭解嗎?

回答

3

是,過濾器屬性,用不正確的語法規定。密鑰應該使用冒號與其值分開。例如。使用「Type:SomeFixture」是有效的。當然你可能不想使用那個過濾器,除非你真的有一個名爲SomeFixture的測試夾具。 :-p

0

我終於明白了!

我剛剛刪除的過濾器屬性,現在測試是否正常運行,一切工作正常

0

我在Bamboo中使用了命令,發現從/ filter參數中刪除任何空格爲我解決了這個問題。