I guess an assertion would be the way to go? sorry still learning
thanks for your help!
lets say the response returns 100 records each records with a different amount. if i know the total amounts should = 3000. then i guess an assertion that would sum up all the amounts of each records and make sure it == 3000.
so to do this would I:
in the TestRequest: add an assertion 'XPath Match'
1) how would the XPath expression be formatted?
if this is the query response for just the first record
//ns1:QueryResponse[1]/ns1:Record[1]/ens:Payment[1]/ens:Amount[1]
i guess i would need a var to plugin for Record[x] above? and loop through it and then sum at the end?
so something like:
{
fn:sum(
for $z in //ns1:QueryResponse[1]/ns1:Record[$z]/ens:Payment[1]/ens:Amount[1])
}
---------------fn:sum-------------------------
fn:sum($srcval as xs:anyAtomicType*) → xs:anyAtomicType?