# MUnit execution in Maven pipelines

*MuleSoft Developer II Study Guide · Implement maintainable and modular Mule applications and their Maven builds · Last updated November 7, 2026 · https://www.certifyforce.com/study-guide/mulesoft-developer-ii/implement-maintainable-and-modular-mule-applications-and-their-maven-builds/munit-execution-in-maven-pipelines*

Activate MUnit in a Maven build, select the intended tests and enforce explicit coverage requirements. Distinguish execution, environment configuration and diagnostic output across plugin versions.

- Certification: Salesforce MuleSoft Developer II
- Exam section: Implement maintainable and modular Mule applications and their Maven builds
- Study guide: https://www.certifyforce.com/study-guide/mulesoft-developer-ii

**Official exam objective:**

> Execute MUnit tests with Maven.

## What the exam expects

- Enable the MUnit plugin and its dependencies in a Mule application build.
- Activate managed plugin configuration in child projects.
- Select suites, named tests or tagged groups without confusing selectors.
- Distinguish missing tests, skipped tests and insufficient coverage.
- Control test properties, runtime selection and dynamic ports.
- Retain useful diagnostic output from automated test runs.

**Suite** is an XML collection of tests; **goal** is a plugin operation; **phase** is a Maven lifecycle stage; **coverage** measures executed application processors; **tag** groups tests; **system property** supplies a named value to the test run ([Test structure](https://docs.mulesoft.com/munit/2.3/munit-test-concept), [Plugin](https://docs.mulesoft.com/munit/2.3/munit-maven-plugin), [Coverage](https://docs.mulesoft.com/munit/2.3/coverage-maven-concept)).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Activation | Children reference the managed plugin under build plugins. | [Parent setup](https://docs.mulesoft.com/munit/2.3/munit-maven-plugin) |
| Named test selector | `#` separates suite and test expressions. | [Selectors](https://docs.mulesoft.com/munit/2.3/munit-maven-plugin) |
| Tag selection | Configure `munitTags` or use `munit.tags`. | [Tags](https://docs.mulesoft.com/munit/2.3/munit-maven-plugin) |
| Empty-run policy | Disabling no-test failure does not disable future test execution. | [Current contract](https://docs.mulesoft.com/munit/latest/munit-maven-plugin) |
| Undefined threshold | `-1` means no requirement at that coverage level. | [Coverage](https://docs.mulesoft.com/munit/2.3/coverage-maven-concept) |
| Failure enforcement | `failBuild` controls whether missed defined levels fail the build. | [Coverage](https://docs.mulesoft.com/munit/2.3/coverage-maven-concept) |
| Excluded coverage | Ignored flows do not contribute to measured processor totals. | [Exclusions](https://docs.mulesoft.com/munit/2.3/coverage-maven-concept) |
| Property priority | Same-named command-line `-D` values take priority. | [Properties](https://docs.mulesoft.com/munit/2.3/munit-maven-plugin) |

## Check yourself

- Why can test-result summaries remain visible after suite output redirection is enabled?
- When diagnostic files must follow the build directory, how can their destination be expressed?
- How can output not associated with a particular suite be exposed during diagnosis?

## Sources

- [MUnit 2.3 Maven Plugin](https://docs.mulesoft.com/munit/2.3/munit-maven-plugin)
- [Current MUnit Maven Plugin](https://docs.mulesoft.com/munit/latest/munit-maven-plugin)
- [MUnit 2.3 Maven Coverage](https://docs.mulesoft.com/munit/2.3/coverage-maven-concept)
- [MUnit 2.3 Dynamic Ports](https://docs.mulesoft.com/munit/2.3/dynamic-ports)
- [MUnit 2.3 Test Structure Fundamentals](https://docs.mulesoft.com/munit/2.3/munit-test-concept)
- [Mule 4.6 Maven Reference](https://docs.mulesoft.com/mule-runtime/4.6/maven-reference)
- [Official MUnit Maven Plugin 3.1.0 artifact descriptor](https://repository.mulesoft.org/releases/com/mulesoft/munit/tools/munit-maven-plugin/3.1.0/munit-maven-plugin-3.1.0.jar)
- [MUnit 3.7.2 Release Notes](https://docs.mulesoft.com/release-notes/munit/munit-3.7.2-release-notes)
- [Official MUnit Maven plugin documentation, May 2022](https://raw.githubusercontent.com/mulesoft/docs-munit/c8b54b4baea3be85398b7a826b6b8ca16fb20e94/modules/ROOT/pages/munit-maven-plugin.adoc)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 12 linked practice questions, and unlimited timed mock exams are included with the MuleSoft Developer II pack (USD $19): https://www.certifyforce.com/practice-exams
