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