Contact Us 1-800-596-4880

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