【问题标题】:Cannot integrate Gallio MBUnit with Team City无法将 Gallio MBUnit 与 Team City 集成
【发布时间】:2010-04-09 13:49:26
【问题描述】:

我已经尝试让我的 MBUnit 测试套件在 Team City 上工作很多天了,但没有任何成功。

我的解决方案没有问题。该程序与我的测试。在谷歌上搜索 Gallio 与 Team City 的集成后,我尝试了很多方法来让这件事发挥作用,我认为我很接近但需要帮助。

我已将 Gallio 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:“Gallio”任务不支持“Assemblies”参数。验证参数是否存在于任务中,并且是可设置的公共实例属性

错误 MSB4063:无法使用其输入参数初始化“Gallio”任务。

感谢您的帮助

【问题讨论】:

    标签: msbuild teamcity mbunit gallio


    【解决方案1】:

    Assemblies 属性已重命名为 Files。 此处的文档:http://www.gallio.org/api/html/T_Gallio_MSBuildTasks_Gallio.htm

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多