Skip to content

SenseAmidMadness/mule-connector-test

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mule Connector Test Framework

Framework for making Mule connectors testing easier.

Get Started

The ConnectorTestCase class simplifies how to call Mule flows and process the corresponding results, you only need to extend it in your connector TestParent class (e.g. SalesforceTestParent).

It includes the following elements:

  • getConfigXmlFile(): points to the Mule XML config file (default "automation-test-flows.xml").
  • DEFAULT_SPRING_CONFIG_FILE: Default Spring XML file for the testing beans ("AutomationSpringBeans.xml").
  • The testData attribute is the TestRunMessage data structure. TestRunMessage can be updated to add runtime generated data thus working as backbone between @Before, @Test and @After methods. Tests interact with the TestRunMessage trough a set of methods.
  • runFlowAndGetPayload: provides a simple way for running a flow and getting payload prior to loading its input data in the TestRunMessage:
String payload = runFlowAndGetPayload("test-get-payload");
MyObject payload = runFlowAndGetPayload("test-get-payload");
  • runFlowAndGetMessage serves the same purpose as runFlowAndGetPayload but will return a Mule Message

For futher samples please take a look at the included tests.

About

Automation test framework for Anypoint Connectors

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%