MUnit testing made easy: Introducing the test recorder

Testing is an essential part of the software development process used to ensure code quality, but the reality is that it can be a daunting and arduous task — especially in larger applications. This can make it difficult for some users to know where to begin when they’re ready to test their Mule applications in MUnit.

MUnit for Java Programmers: Test execution

Unit tests are executed at different stages during the development life cycle. As mentioned in the first blog post of this series, MUnit for Java Programmers: Introduction, unit tests play an essential role in the implementation, maintenance, and evolutionary stages of a project’s life cycle. Tests can be executed during each of these stages and the results are collected and analyzed. Should the application pass the series of tests it will continue on its journey through the project’s lifecycle.

MUnit for Java Programmers: Test doubles

What are test doubles?

A test double is a term used to describe replacing a dependent component of the functionality that is being tested with a dummy version of the real component — similar to a stunt double, only for unit tests. The test double only needs to emulate the behavior of the original dependent component closely enough that the functionality being tested doesn’t detect it’s not using the real component.

MUnit for Java Programmers: Test fixtures

February 26 2020

0 comments

Test fixtures, also known as a test context, sets up the conditions for a test to run. These test conditions will be a known good state that is specific to the code under test. When the test is completed, the state is restored or torn down. Conditions can be set up before a test suite executes and before a test runs. Test suites are extended further by parameterizing executions, enabling the same test to run different inputs. 

Setting up Postman for easier development with Anypoint Platform APIs

Postman has become the standard for any developer working with APIs. It provides an intuitive interface that allows developers to easily configure, interact, and test APIs.

Easier assertions for XML and JSON in MUnit

This is a guest blog from a member of our developer community. Dr. Roger Butenuth is a Senior Java Consultant at codecentric, he has been using Anypoint Platform for five years, with projects ranging from building simple SOAP routing/transformation to introducing the API-led approach to a Fortune 500 company.

Building Mule applications differs from coding in Java. Instead of typing all your code (with a lot of CTRL+space completion),

Testing with MuleSoft’s MUnit: Part 2

mulesoft munit testing

This tutorial continues from Part 1.

Mock is a feature provided by MUnit to mock the behavior of the message processor. Basically, MUnit replaces the actual behavior of message processor with the behavior defined by the user.

There are various scenarios where we can use the Mock Message processor. Imagine we have completed the development of a Mule application and need to test it,

Testing with MuleSoft’s MUnit: Part 1

mulesoft munit

Learn more about MUnit and learn more about how to test Mule.

MUnit is a Mule application testing 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.

Refactoring MUnit: the Mule testing framework

A few years ago, a MuleSoft engineer had a vision. That vision: automated testing for Mule applications in Anypoint Studio. As this developer’s focus was building Mule applications to connect SaaS apps, a validation framework would significantly reduce development time and increase productivity across teams. More specifically, unit tests would allow this developer to mock dependencies, uncover problems early, refactor applications quickly, and provide agile documentation for other Muleys.

Man in the Mirror, Apple’s Security Flaw, and the Importance of Unit Testing

The “Man-in-the-Middle” attack is such a well-recognized security risk, with established solutions and preventative measures in place that when I first heard about the recent ruckus around the Apple security flaw, I thought Apple’s trouble was more legal in natural, maybe some sort of royalties dispute between iTunes and the Michael Jackson estate. Only later did I found out what all the fuss was about “in the middle”,