Monday, October 28, 2013

How to Test XML Using XML Unit API with examples



Introduction : In the Enterprise Integration World, often do we see requirements of testing real messages which gets generated as an output. Particularly when we are doing development in a Test Driven Development model, the need to test output messages becomes more eminent. 

The generated output messages can be of any format but predominantly they are xmls as an industry adopted standard. 

These result messages can be picked up from the mock output queues or temporary output folders.
One common requirement is to test these xml contents & schema structures. 

This is where XMLUnit api comes handy.Today we will discuss the usage of xml unit with multiple examples & references to original site articals.

Example 1 : Testing Simple XML Message Contents (apples to apples)




Thursday, February 7, 2013