6

如何配置 Team Build 2010构建过程模板以通过 Gallio 运行 MbUnit 测试?

4

1 回答 1

5

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

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

将结果整合起来似乎与能够导入“trx”文件有关。正在调查对此的支持(请参阅Gallio-Dev 讨论组中的主题

这是我用来替换现有 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 测试运行程序的副本位于源代码控制树中。

于 2010-03-24T00:08:47.287 回答