Free MuleSoft CONNECT Keynote & Expo Pass Available!

Register now+
Nav

About MUnit

MUnit is a Mule application testing framework that allows you to easily build automated tests for your integrations and APIs. It provides a full suite of integration and unit test capabilities, and is fully integrated with Maven and Surefire for integration with your continuous deployment environment.

With MUnit you can:

  • Create your test by writing Mule code

  • Mock processors

  • Spy any processor

  • Verify processor calls

  • Enable or ignore particular tests

  • Tag tests

  • Check visual coverage in Studio

  • Generate coverage reports

MUnit version 2.1, works with all Mule versions since 4.0

MUnit is divided in two main sub modules:

  • MUnit

  • MUnit Tools

Each module has its own dependency:

MUnit Dependencies

         
      
1
2
3
4
5
6
7
<dependency>
        <groupId>com.mulesoft.munit</groupId>
        <artifactId>munit-runner</artifactId>
        <version>2.1.0</version>
        <classifier>mule-plugin</classifier>
        <scope>test</scope>
</dependency>
MUnit Tools dependencies

         
      
1
2
3
4
5
6
7
<dependency>
        <groupId>com.mulesoft.munit</groupId>
        <artifactId>munit-tools</artifactId>
        <version>2.1.0</version>
        <classifier>mule-plugin</classifier>
        <scope>test</scope>
</dependency>

MUnit is fully integrated with Anypoint Studio, allowing you to create, design and run MUnit tests just like you would Mule applications.

In this topic: