Wednesday, June 08, 2011

REST-assured Tricks How to test Array of values -XML

RESTful web services often return multiple values. Some times in form of an array.To test for multiple values we can use .hasItems()
hasItems() works only for JSON. For XML we have to use hasXPath()
// test multiple values
String result= given().header("accept", "application/xml")

No comments: