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:

      <runtimeVersion>4.3.0-20200727</runtimeVersion> (1)
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:

  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