代码之家  ›  专栏  ›  技术社区  ›  David Gardiner

使用Gallio/MBUnit和TFS 2010团队构建

  •  6
  • David Gardiner  · 技术社区  · 15 年前

    如何配置TeamBuild2010 build process template 通过Gallio运行MBUnit测试?

    1 回复  |  直到 15 年前
        1
  •  5
  •   David Gardiner    15 年前

    我通过创建一个基于默认值的新的构建过程模板来实现这一点。然后,我向下滚动到该部分以查找mstest活动,并将其替换为一个名为galio.echo.exe的invokeProcess活动。

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

    获取要集成的结果似乎与能够导入“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>
    

    在本例中,我假设galio.echo.exe测试运行程序的副本位于源代码管理树中。

    推荐文章