Unit Tests
- Use MUnit, mock all the Connectors/Transports that make an outbound call.
- If there are query parameters, uri parameters or headers, use the set-message component to mock the incoming parameters
- Use Dataweave to simulate requests
- Naming conventions
- Test flows: {name-of-the-flow}-unit-test
- Files: {name-of-the-mule-file}-unit-test
- For more information:
Integration Tests
- Use MUnit, don’t mock the Connectors/Transports.
- Be sure to not affect real data or to rollback the transaction when executing operations like WRITE, UPDATE, DELETE.
- Naming conventions
- Test flows: {name-of-the-flow}-integration-test
- Files: {name-of-the-mule-file}-integration-test
- For more information:
End to End Testing
- Use UpTrends, defining clear testing scenarios
Performance Testing
- These kind of tests are really difficult to automate without a dedicated software.
- The common approach is to define some test cases in JMeter and run them on-demand.
- See the Performance Test – Best Practices