Nav
You are viewing an older version of this topic. To go to a different version, use the version menu at the upper-right. +

FAQ: How Does MUnit Calculate Coverage

The MUnit Coverage Module unit of measure is the Event processor.
MUnit calculates coverage by counting all the event processors that have been executed as result of the MUnit test being run and comparing that number with the amount of event processors that compose the whole application.
Although the reports arrange the resulting information by flow and configuration file, the calculations are run against the number of event processors.

As a general rule each XML node inside a top-level XML node is an event processor. That is each node inside a flow, sub-flow, catch, batch.
Top-level elements are not event processors.

Given the nature of XML structure this definition might lead to confusion, mostly when it comes to container elements (XML containing child elements).
In order to avoid such confusion here is a list of the most common event processors that are containers in Mule and how they are accounted by the MUnit Coverage:

  • Container Elements Considered event processors

    • Choice Router

    • Until Successful

    • First Successful

    • Scatter Gather

    • For Each

  • Container Elements Not Considered event processors

    • Batch Step

    • Error Handlers

See Also

In this topic:

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+