---
schema_version: "1"
id: 288acff3bdc2ff5d5f11ecb9875de9354e6c28c2e541c273860e47429b2e2890
title: Studio でのカバー率の使用
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/munit/2.3/coverage-studio-concept.md
canonical_url: https://docs.mulesoft.com/jp/munit/2.3/coverage-studio-concept
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 96b966d440177cbe866eccd8cb620fce4394c640c3f6bc485ecca28c77580ea0
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
# Studio でのカバー率の使用

Anypoint Studio からカバー率レポートを実行できます。

次の設定は、Studio で MUnit テストを実行する場合のみ適用されます。この設定は、CI/CD 環境で Maven からテストを実行する場合は適用されません。  
Maven からカバー率レポートを実行するには、[カバー率の Maven 設定](https://docs.mulesoft.com/jp/munit/2.3/coverage-maven-concept)を参照してください。

## [](#anypoint-studio-でのカバー率レポートの有効化)Anypoint Studio でのカバー率レポートの有効化

\[Coverage (カバー率)\] ボタンをクリックすると、テストの対象となっているフロー、およびそれらのフロー内のイベントプロセッサーの割合を確認できます。

![\[MUnit\] セクションで強調表示された \[MUnit Coverage (MUnit のカバー率)\] タブ](_images/using-munit-coverage-in-anypoint-studio.png)

\[Overall Coverage (全体のカバー率)\] の値は、MUnit テストが実行する Mule アプリケーションイベントプロセッサーの割合を表します。

**\[Generate Report (レポートの生成)\]**​ をクリックすると、MUnit テストに含まれている Mule 設定ファイル内のフローとイベントプロセッサーの詳細を表示するレポートを取得できます。

![レポートに含まれるファイルが強調表示されています](/mulesoft/current/ja-jp/munit/2.3/_images/munit-coverage-report-in-anypoint-studio.png)

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 20%;">
<col style="width: 80%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">列</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><strong>Resource (リソース)</strong>​</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Mule 設定ファイルの名前</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><strong>Containers (コンテナ)</strong></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Mule 設定ファイル内のフロー数</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><strong>Weight (重み)</strong>​</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>設定ファイル内のアプリケーションの割合<br>
                ドキュメント内のイベントプロセッサーの総数と Mule 設定ファイル内のイベントプロセッサーの数の割合</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><strong>Coverage (カバー率)</strong>​</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>MUnit テストが実行する Mule 設定ファイル内のイベントプロセッサーの割合</p>
</div></div></td>
</tr>
</tbody>
</table>

さらに、それぞれの ​**\[Resource (リソース)\]**​ をクリックすると、そのリソースで実行されたイベントプロセッサーのより具体的な詳細レポートを取得できます。

![具体的なレポートが強調表示された MUnit のカバー率レポート](/mulesoft/current/ja-jp/munit/2.3/_images/munit-granular-coverage-report-in-anypoint-studio.png)

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 20%;">
<col style="width: 80%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">列</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><strong>Name (名前)</strong>​</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>コンテナの名前</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><strong>Type (型)</strong>​</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>コンテナの種別</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><strong>Covered Processors (カバーされるプロセッサー)</strong></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>MUnit テスト中に実行されるコンテナ内のプロセッサー</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><strong>Processors (プロセッサー)</strong>​</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>コンテナ内のプロセッサーの総量</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><strong>Coverage (カバー率)</strong>​</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>MUnit テストで実行されるコンテナ内のイベントプロセッサーの割合</p>
</div></div></td>
</tr>
</tbody>
</table>

## [](#カバー率レポートの無効化)カバー率レポートの無効化

これを選択した場合、カバー率計算をプロジェクトの実行設定から無効にして、カバー率レポートなしでフローをテストできます。

**\[Package Explorer\]**​ を右クリックし、​**\[Run As (別のユーザーとして実行)\]**​ > ​**\[Run Configurations (設定を実行)\]**​ を選択します。MUnit 実行設定ファイルを選択してスイートの設定にアクセスし、カバー率設定の ​**\[Run coverage (カバー率を実行)\]**​ オプションをオフにします。

![MUnit 実行と \[Run coverage (カバー率を実行)\] が強調表示されています](_images/disable-munit-coverage-in-anypoint-studio.png)

## [](#munit-カバー率レポートから-xml-ファイルを除外する)MUnit カバー率レポートから XML ファイルを除外する

アプリケーションをテストする際には、MUnit カバー率レポートから 1 つ以上の XML ファイルを除外できます。たとえば、品質基準を満たしていないサードパーティ XML ファイルを除外して最終的なレポートスコアを改善できます。

1. 変更するフローに移動します。
2. **\[Run (実行)\]**​ > ​**\[Run Configuration (設定を実行)\]**​ をクリックします。
3. プロジェクトの名前をクリックします。
4. **\[Ignored files (無視されたファイル)\]**​ セクションで ​**\[Add (追加)\]**​ をクリックします。
    
    ![\[Test (テスト)\] タブで強調表示されている \[Add Ignored File (無視されたファイルを追加)\] ウィンドウ](_images/add-ignored-files.png)
5. カバー率レポートから除外する XML ファイルの名前を入力し、​**\[OK\]**​ をクリックします。
6. **\[Apply (適用)\]**​ と ​**\[Run (実行)\]**​ をクリックします。

## [](#関連情報)関連情報

- [Coverage (カバー率)](https://docs.mulesoft.com/jp/munit/2.3/munit-coverage-report)
- [カバー率の Maven 設定](https://docs.mulesoft.com/jp/munit/2.3/coverage-maven-concept)