今天早上我问了一个关于Gallio和Team City之间的集成问题的问题。我更改了msbuild文件,以便在最新的Gallio构建脚本API中使用正确的语法。感谢Jeff Brown,但现在当我尝试在Team City上构建应用程序时,我得到了以下错误:
执行Gallio任务期间出现意外错误。16:19:49: Project "CoderForTraders.msbuild.teamcity.patch.tcprojx“(重建解决方案;运行测试目标):C:\TeamCity\buildAgent\work\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>你对可能出现的问题有什么想法吗?
发布于 2010-04-10 17:53:32
是,指定筛选器属性的语法不正确。应该使用冒号将键与其值分开。例如:使用"Type:SomeFixture“是有效的。当然,除非您真的有一个名为SomeFixture的测试夹具,否则您可能不想使用该过滤器。:-p
发布于 2010-04-10 04:45:31
我终于明白了!
我刚刚删除了Filter属性,现在测试运行正常,一切工作正常
发布于 2014-05-09 17:34:55
我在竹子中使用了命令,并发现从/filter参数中删除任何空格可以为我解决这个问题。
https://stackoverflow.com/questions/2610709
复制相似问题