Contact Free trial Login

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.

Patching 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:

<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>
1 Be sure to replace the placeholder version in this example with your version, as provided by MuleSoft.

Patching MUnit Using Studio

By default, MUnit runs in Anypoint Studio with the Mule runtime engine version of the project’s server. You can override this version by specifying the patched Mule version in the MUnit run configuration menu:

  1. In the top menu bar, select Run and Run Configurations….

  2. Under MUnit, select your MUnit test file.

  3. In the Mule Runtime Version field under Advanced Settings type the Mule patched version you want to use.

    runtime patching studio

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.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub