framework which allows you to build automated tests for your mule integrations and API's. MUnit is very well integrated with Anypoint Studio. Various features available with Mule MUnit • Create and build Mule tests by writing Mule code. • Create and build Mule tests by writing Java code. • Verify Message Processor calls. • Mock Message Processor. • Mock outbound endpoints. • Disable outbound endpoints. • Disable flow inbound connectors.
up windows and select MUnit Update Site from drop down list. Check MUnit and MUnit Tools for Mule. Finally, just click Next and accept the license terms and conditions. Click Finish and it will install MUnit tools in your Anypoint studio.
will create MUnit tests for the flow and it will be available in folder src/test/unit. In Assert Payload, you need to define Expected value and in this case it will be payload. Also, provide Test failure message , in case if value doesn't message expected value then it will provide failure message you have defined.
be provide details like errors, failures if any, coverage report and test status. In above image, green color means that your test case has been successfully executed and passed.