In my SoapUI response I have a XML structure that repeats itself. For examples:
<b:quote-data>
<b:quote-data>
<b:premium>4.66</b:premium>
</b:quote-data>
<b:quote-data>
<b:premium>5.6</b:premium>
</b:quote-data>
<b:quote-data>
<b:premium>7.58</b:premium>
</b:quote-data>
</b:quote-data>
I currently have the assertion which works to assert the value in the first premium field. I don't understand how to have multiple asserts to match all three fields.
// get the xml response
def response = messageExchange.getResponseContent()
// parse it
def xml = new XmlSlurper().parseText(response)
// find your node by name
def node = xml.'**'.find { it.name() == 'premium' }
// assert
assert node.toString().matches("4.66")
Is there a Way to skip over the first field to asset the second?