---
schema_version: "1"
id: 6199c0759a21f83132bca42175db8fef292a31866234f2b4c641bf8eb5deb7a8
title: MUnit Coverage Report
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/munit/latest/munit-coverage-report.md
canonical_url: https://docs.mulesoft.com/munit/latest/munit-coverage-report
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 9ac952fa2eea59181a500d4e521273cbc909dfe00164a870fd554f8dbe8c9c14
description: MuleSoft Documentation Site
release: "3.7"
latest: true
---
---
product: MUnit
version: 3.7
is-latest-version: true
---

# MUnit Coverage Report

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

![logo acb active](/mulesoft/current/en-us/_/img/icons/anypoint-code-builder.svg "Anypoint Code Builder")Anypoint Code
Builder

![logo studio active](/mulesoft/current/en-us/_/img/icons/studio.svg "Anypoint Studio")Anypoint Studio

The MUnit Coverage feature measures how much of a Mule application is executed by a set of MUnit
tests by counting event processors. Use it to track application, resource, and flow coverage metrics
and enforce quality standards.

- Application overall coverage: An average of the items below.

- Resource coverage: Refers to each Mule configuration file under src/main/mule.

- Flow coverage: Refers to any of the following components: Flows, Sub-flows, and Batch jobs.

Coverage report runs only for EE edition runtimes. If your application has a `requiredProduct` of a
Mule CE runtime you will see the following message: **Coverage is a EE only feature and you’ve
selected to run over CE**. To run against an EE runtime see
[Specifying the Runtime Product](https://docs.mulesoft.com/munit/latest/munit-maven-plugin#specify-runtime-product).

The following is a coverage report sample in JSON format.  
Use the code callouts below to understand each field in the report:

MUnit Coverage - sample JSON report

```json
{
  "coverage": 75.0, (1)
  "requiredApplicationCoverage": 40.0, (2)
  "requiredResourceCoverage": 30.0,    (2)
  "requiredFlowCoverage": 25.0,        (2)
  "flowCount": 3,             (3)
  "processorCount": 4,        (4)
  "coveredProcessorCount": 3, (5)
  "files": [ {
    "name": "file1.xml", (6)
    "flowCount": 1,      (7)
    "coverage": 100.0,   (8)
    "processorCount": 2, (9)
    "weight": 50.0,     (10)
    "flows": [ {
      "name": "file1Flow1", (11)
      "type": "FLOW",       (12)
      "coverage": 100.0,    (13)
      "messageProcessorCount": 2, (14)
      "coveredProcessorCount": 2, (15)
      "lines": [ { (16)
        "lineNumber": 11,
        "covered": true
      }, {
        "lineNumber": 12,
        "covered": true
      } ]
    } ]
  }, {
    "name": "file2.xml",
    "flowCount": 2,
    "coverage": 50.0,
    "processorCount": 2,
    "weight": 50.0,
    "flows": [ {
      "name": "file2Flow2",
      "type": "SCOPE",
      "coverage": 100.0,
      "messageProcessorCount": 1,
      "coveredProcessorCount": 1,
      "lines": [ {
        "lineNumber": 10,
        "covered": true
      } ]
    }, {
      "name": "file2Flow1",
      "type": "SCOPE",
      "coverage": 0.0,
      "messageProcessorCount": 1,
      "coveredProcessorCount": 0,
      "lines": [  {
        "lineNumber": 7,
        "covered": false
      } ]
    } ]
  } ]
}
```

<table><tbody><tr><td><i data-value="1"></i><b>1</b></td><td>Coverage percentage of the whole application.</td></tr><tr><td><i data-value="2"></i><b>2</b></td><td>Required coverages for application, resources, and flows. If not configured, they default to -1.</td></tr><tr><td><i data-value="3"></i><b>3</b></td><td>Amount of flows in the application.</td></tr><tr><td><i data-value="4"></i><b>4</b></td><td>Amount of event processors in the application.</td></tr><tr><td><i data-value="5"></i><b>5</b></td><td>Amount of covered event processors.</td></tr><tr><td><i data-value="6"></i><b>6</b></td><td>Name of that file.</td></tr><tr><td><i data-value="7"></i><b>7</b></td><td>Amount of flows in that file.</td></tr><tr><td><i data-value="8"></i><b>8</b></td><td>Coverage percentage of that file.</td></tr><tr><td><i data-value="9"></i><b>9</b></td><td>Amount of event processors in that file.</td></tr><tr><td><i data-value="10"></i><b>10</b></td><td>Contribution of that file to the coverage percentage of the whole application.</td></tr><tr><td><i data-value="11"></i><b>11</b></td><td>Name of the flow.</td></tr><tr><td><i data-value="12"></i><b>12</b></td><td>Type of the top level element.<br>Other type of top level element in coverage is error-handler.</td></tr><tr><td><i data-value="13"></i><b>13</b></td><td>Coverage percentage of that flow.</td></tr><tr><td><i data-value="14"></i><b>14</b></td><td>Amount of event processors in that flow.</td></tr><tr><td><i data-value="15"></i><b>15</b></td><td>Amount of event processors covered in that flow.</td></tr><tr><td><i data-value="16"></i><b>16</b></td><td>XML line numbers containing event processors in that file, and whether they were covered or not.</td></tr></tbody></table>

## See Also

- [Coverage in Maven](https://docs.mulesoft.com/munit/latest/coverage-maven-concept)
