6

Gallio を介して MbUnit テストを実行するには、Team Build 2010ビルド プロセス テンプレートをどのように構成しますか?

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 に答える