2010-03-22 73 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测试运行程序位于源代码管理树中。

相关问题