Contact Free trial Login

Runtime Patching

Patching in MUnit is different than how the mule runtime is patched.
MUnit runs using the embedded container, which downloads all required dependencies to start a container based on a given version. To use a patched version, for example 4.1.2-hf2, you need to specifically point MUnit to run against it. You can do this from both Maven and Studio.

Patching MUnit from Maven

By default, MUnit runs with the runtime corresponding to the minMuleVersion of the mule-artifact.json file. You can override this version by using the runtimeVersion attribute of the munit-maven-plugin configuration:

      <runtimeVersion>4.1.2-hf2</runtimeVersion> (1)
1 Remember that this version is an example. You need to declare the correct version provided by the team.

Patching MUnit from Studio

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

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

  2. Under MUnit, select your MUnit test file.

  3. Type the MUnit patched version you want to use in the Mule Runtime Version field, under Advanced Settings.

    runtime patching 7d385
    If you already set the runtimeVersion attribute in the pom as shown in the “From Maven” section, you can click the *Load configuration from pom file* option to automatically load this version into the *Mule Runtime Version* field.