开发者

Using Gallio/Mbunit with TFS 2010 Team Build

开发者 https://www.devze.com 2022-12-23 22:45 出处:网络
How do you configure a Team Build 2010 build process template to run MbUnit tests via 开发者_JS百科Gallio?I managed to get this to work by creating a new build process template based on the default. I

How do you configure a Team Build 2010 build process template to run MbUnit tests via 开发者_JS百科Gallio?


I managed to get this to work by creating a new build process template based on the default. I then scrolled down to the section to find the MSTest activities, and replaced those with an InvokeProcess activity that called Gallio.Echo.exe

This runs Gallio ok, but the test results don't get integrated into the build report.

Getting the results to integrate appears to relate to being able to import a 'trx' file. Support for this is being investigated (see thread in Gallio-Dev discussion group)

Here is the XAML markup that I used to replace the existing MSTest activity:

<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>

In this example, I assume that a copy of the Gallio.Echo.exe test runner is located within the source control tree.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号