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. 

MUnit for Java Programmers: Test Assertions

February 20 2020

0 comments

At the heart of unit tests are assertions which provide a mechanism for comparing expected outcomes with actual outcomes. JUnit provides a large selection of overloaded convenience methods that perform predefined logical assertions, such as testing for equality, negations, and conditions specified by a matcher. MUnit also provides a similar set of assertion capabilities such as to assert two values as equals, validate a logical condition, and a variety of other custom assertions that replicate familiar JUnit assertions.

MUnit 1.0 Release Candidate

We’re happy to announce the 1.0 release candidate of MUnit – the unit and functional test framework for Mule. This is our first official release of MUnit and incorporates major usability improvements, broader support for Mule components and many bug fixes.