MUnit | Unit Testing | Integration Testing
What is MUnit?
Prior to deploying your Mule applications and APIs, conduct unit and functional tests using MUnit, a native testing framework for Mule. Test in your local environment, or in your continuous integration and continuous delivery (CI/CD) settings.
- Design and test your Mule apps and APIs, graphically or in XML, all within Studio
- Easily integrate testing into your existing CI/CD process
- Minimize manual work with auto-generated tests and coverage reports
- Leverage local DB/FTP/mail servers to make testing more portable through the CI process
Learn what else you can do with Anypoint Platform.
Use the graphical interface or XML editing within Anypoint Studio to build an MUnit test, the same you would compose a Mule integration project. MUnit is fully embedded in Studio, allowing you to use the same palette and debugger, and generate coverage reports, all within the same UI, preventing the need for developers to context switch or learn new interfaces.
Seamlessly integrate testing into your current continuous integration and continuous delivery process. With support for Maven, it is simple to integrate with build systems such as Jenkins and with its extensible nature, MUnit can also easily integrate with systems such as Surefire and SonarQube.
Using RAML files, MUnit can auto-generate basic MUnit tests which help you speed up your test composition. MUnit will leverage data types specified in RAML to form the validation example data. Anything that is generated can be extended and customized as you need.
To provide a frictionless experience for users who want to test their applications and APIs, MUnit has built-in utility modules to support local testing of FTP, SFTP, database (DB) and mail servers. This removes the need for users to install any servers in testing stages to avoid connecting to external systems, making the tests portable.
Coverage reports provide metrics on how much of a Mule application has been executed by a set of MUnit tests. With a click of a mouse, you can generate coverage reports inside Studio to see the application, resource and flow coverage. If desired, coverage reports can also be generated in JSON for integration into your own reporting system.
“Junior developers with little experience can use the GUI to become productive with MUnit in less than a week, which is impressive.”
IT manager, Global professional services company