Reputation: 1187
I am facing a strange scenario while writing Munit test cases in Mule. I have successfully written couple of Munit test cases for maven based sample Mule project and the test cases are running fine. When it comes to a project where I used RAML, and I've generated test cases and did every thing to test a flow. It was very strange that even a logger on a Munit flow is not printing any message.
Here is my flow:
<munit:config name="munit" doc:name="MUnit configuration"/>
<munit:test name="MainFlow-test-suite-MainFlowTest" description="Test">
<munit:set payload="{"msg": "Ram"}" doc:name="Set Message" />
<logger message="#[payload]" level="INFO" doc:name="Logger" />
<!-- <flow-ref name="MainFlow" doc:name="Flow-ref to MainFlow"/> -->
</munit:test>
At least, the logger should print {"msg": "Ram"}.
Can any one suggest?
Upvotes: 0
Views: 639
Reputation: 712
The probable reason for it not to be working is that you are missing a few attributes in the munit:config, mock-connectors & mock-inbounds:
<munit:config mock-connectors="false" mock- inbounds="false"/>
In any case please take a look at this this doc page it explain the APIKit testing scenario.
HTH
Upvotes: 0