2010-03-22 100 views

回答

5

我設法通過創建一個基於默認的新的構建過程模板來實現這個功能。然後我向下滾動到該部分以查找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(&quot; &quot;, From q In testAssemblies Select &quot;&quot;&quot;&quot; &amp; q &amp; &quot;&quot;&quot;&quot;)]" 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測試運行程序位於源代碼管理樹中。

相關問題