6
如何配置Team Build 2010 build process template以通过Gallio运行MbUnit测试?在TFS 2010中使用Gallio/Mbunit Team Build
如何配置Team Build 2010 build process template以通过Gallio运行MbUnit测试?在TFS 2010中使用Gallio/Mbunit Team Build
我设法通过创建一个基于默认的新的构建过程模板来实现这个功能。然后我向下滚动到该部分以查找MSTest活动,并用一个名为Gallio.Echo.exe的InvokeProcess活动替换那些活动。这会运行Gallio,但测试结果不会被集成到构建报告中。
获得结果集成似乎涉及到能够导入'trx'文件。这种支持正在调查中(见thread in Gallio-Dev discussion group)
这里是XAML标记,我用来替换现有的MSTest的活动:
<scg:List x:TypeArguments="x:Object" Capacity="1">
<p:Sequence VirtualizedContainerService.HintSize="256,384">
<p:Sequence.Variables>
<p:Variable x:TypeArguments="x:String" Name="GallioEcho" />
</p:Sequence.Variables>
<WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</WorkflowViewStateService.ViewState>
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Echo Server Path to Local Path" VirtualizedContainerService.HintSize="234,22" Input="$/MyProject/trunk/Libs/Gallio/Gallio.Echo.exe" Result="[GallioEcho]" Workspace="[Workspace]" />
<mtbwa:InvokeProcess Arguments="[String.Join(" ", From q In testAssemblies Select """" & q & """")]" DisplayName="Gallio Echo" FileName="[GallioEcho]" VirtualizedContainerService.HintSize="234,198">
<mtbwa:InvokeProcess.ErrorDataReceived>
<p:ActivityAction x:TypeArguments="x:String">
<p:ActivityAction.Argument>
<p:DelegateInArgument x:TypeArguments="x:String" Name="errOutput" />
</p:ActivityAction.Argument>
<mtbwa:WriteBuildError VirtualizedContainerService.HintSize="200,22" Message="[errOutput]" />
</p:ActivityAction>
</mtbwa:InvokeProcess.ErrorDataReceived>
<mtbwa:InvokeProcess.OutputDataReceived>
<p:ActivityAction x:TypeArguments="x:String">
<p:ActivityAction.Argument>
<p:DelegateInArgument x:TypeArguments="x:String" Name="stdOutput" />
</p:ActivityAction.Argument>
<mtbwa:WriteBuildMessage VirtualizedContainerService.HintSize="200,22" Message="[stdOutput]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
</p:ActivityAction>
</mtbwa:InvokeProcess.OutputDataReceived>
</mtbwa:InvokeProcess>
</p:Sequence>
</scg:List>
在这个例子中,我假设Gallio.Echo副本.exe测试运行程序位于源代码管理树中。
如果你可以找到更多关于它的信息,那么请在这里添加它。我喜欢MbUnit/Gallio,但MSFT拥有疯狂的资源。 – 2010-07-24 13:12:06