<plugin>
<groupId>com.mulesoft.munit.tools</groupId>
<artifactId>munit-maven-plugin</artifactId>
<version>${munit.version}</version>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<runtimeVersion>4.3.0-20200727</runtimeVersion> (1)
</configuration>
</plugin>
Patching the Embedded Mule Runtime Engine Version
Patching in MUnit is different from patching in Mule runtime engine. MUnit runs using an embedded Mule container, which downloads all required dependencies to start Mule based on a given version. To use a patched Mule version (for example, 4.3.0-20200727
), you must point MUnit to run specifically against it. You can do this from either Maven or Anypoint Studio.
Patch MUnit Using Maven
By default, MUnit runs against the Mule version corresponding to the minMuleVersion
defined in the mule-artifact.json
file. You can override this version by using the runtimeVersion
attribute of the munit-maven-plugin
artifact configuration:
1 | Be sure to replace the placeholder version in this example with your version, as provided by MuleSoft. |
Patch MUnit Using Studio
By default, MUnit runs in Anypoint Studio with the Mule runtime engine version of the project server. You can override this version by specifying the patched Mule version in the MUnit run configuration menu:
-
In the menu bar, select Run and Run Configurations.
-
Under MUnit, select your MUnit test file.
-
In the Mule Runtime Version field under Advanced Settings, type the Mule patched version to use.
If you already set the runtimeVersion
attribute in the POM file of your project, click Load configuration from POM file to automatically load this version into the Mule Runtime Version field.