无法将 Gallio MBUnit 与 Team City 集成
我已经尝试让我的 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”任务。
感谢您的帮助
I have been trying to get my MBUnit tests suite to work on Team City for many days now without any success.
My solution builds no problem. The program is with my tests. After googling for Gallio integration with Team City I tried many ways to make this thing work and I think I am close but need help.
I have included the gallio bin directory to my repository and also on my TC Server.
Here is my build runner set up in Team City :
Build runner : MSBuild
Build file path : Myproject.msbuild
Targets : RebuildSolution RunTests
Here is Myproject.msbuild file I created and included in the Source control trunk directory :
<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>
Here are the errors displayed by Team City :
error MSB4064: The "Assemblies" parameter is not supported by the "Gallio" task. Verify the parameter exists on the task, and it is a settable public instance property
error MSB4063: The "Gallio" task could not be initialized with its input parameters.
Thanks for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
程序集属性已重命名为文件。
此处的文档: http://www.gallio.org/api/html/T_Gallio_MSBuildTasks_Gallio.htm
The Assemblies attribute has been renamed to Files.
Documentation here: http://www.gallio.org/api/html/T_Gallio_MSBuildTasks_Gallio.htm