skillworkspaceTestingintermediate

MUnit Test Generator

Generates MUnit test suites for Mule flows including happy path, error cases, and mocked dependencies.

(0 reviews)
0 forks
MC
by MuleSoft Community
Name
munit-test-generator
Description
Generate MUnit test suites for Mule flows with mocks and assertions
Scope
workspace
Activates when
When the user asks to create or generate MUnit tests

Skill Instructions

When the user asks to create tests for a Mule flow:

  1. Read the target flow XML to understand processors and dependencies
  2. Create test file in src/test/munit/ following naming convention: {flow-name}-test-suite.xml
  3. For each test case:
    • Set up mock processors for external connectors (DB, HTTP, Salesforce)
    • Define test event with sample payload and attributes
    • Execute the flow under test
    • Assert response payload, status code, and variable values
  4. Include test cases for:
    • Happy path with valid input
    • Invalid input (validation errors)
    • Downstream system failure (connection refused, timeout)
  5. Verify error handler behavior in failure cases

Community Results

0 people tried this

Sign in to share your experience with this prompt.

Tags

munittestingtest-generationmocks

Reviews (0)

Sign in to leave a review.

No reviews yet. Be the first to share your experience!

Comments (0)

Sign in to leave a comment.

No comments yet. Be the first to share your thoughts!