使用Gallio / Mbunit和TFS 2010 Team Build

时间:2010-03-22 09:53:18

标签: tfs2010 mbunit team-build gallio

如何配置Team Build 2010 build process template以通过Gallio运行MbUnit测试?

1 个答案:

答案 0 :(得分:5)

我设法通过基于默认值创建新的构建过程模板来实现此目的。然后我向下滚动到该部分以查找MSTest活动,并将其替换为名为Gallio.Echo.exe的InvokeProcess活动

这可以运行Gallio,但测试结果没有集成到构建报告中。

获得要整合的结果似乎与能够导入'trx'文件有关。正在调查对此的支持(见thread in Gallio-Dev discussion group

以下是我用来替换现有MSTest活动的XAML标记:

<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测试运行器的副本位于源代码管理树中。