Ankit Prakash
Ankit Prakash

Reputation: 37

Using assert-payload option in munit in mule

I'm getting xml file as output while running munit test case for the flow, but to make sure the output is correct or not i want to use assert payload option in munit.

Please help me how can i make sure the code functionality is working properly and the output is as expected.

Upvotes: 0

Views: 1635

Answers (1)

AnupamBhusari
AnupamBhusari

Reputation: 2415

If you are getting XML payload either you can compare entire XML output with test resource file as #[getResource('output.xml').asString()] or you can use XPath expression to check specific fields in output XML.

HTH.

Upvotes: 2

Related Questions