BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
10 / 18 · Module 13 — MUnit · filtered: cheatsheet← prev⊞ allnext →

13.1What should MUnit test?

For a Mule flow like:

HTTP request
   ↓
Validate
   ↓
Transform
   ↓
Salesforce Upsert
   ↓
Choice
   ↓
Transform response

you do not want every test calling a real Salesforce sandbox.

Most tests should answer questions like:

Given this input,
does the flow:

- generate the correct Salesforce payload?
- choose the correct branch?
- handle connector failures correctly?
- return the right API response?
- call Salesforce exactly once?
- avoid Salesforce calls when validation fails?

That is what MUnit is excellent at.