Klaus0815
12 years agoNew Contributor
Problem with xQuery assertion
Hey,
i have a porblem with importing testCase properties to a assertion. With xpath there is no problem, i do it like this:
But with xQuery, which i originaly want to use the problem appears. i try to do something like that:
but this didn't work. the result is always 2. I think because of of the " ' " signs the count-method don't count the number of the values in the result XML,
but the count of the properties. It is possible to transform the xpath statement to a xquery?
Can somebody help me please.
i have a porblem with importing testCase properties to a assertion. With xpath there is no problem, i do it like this:
count( ${#TestCase#Count1} )+ count( ${#TestCase#Count2} )-count( ${#TestCase#Count3})
But with xQuery, which i originaly want to use the problem appears. i try to do something like that:
<result>[C.1]:
{
for $z in *
let $summe := count( '${TestCase#Count1}' )+ count( '${TestCase#Count2}' )
return $summe
}
</result>
but this didn't work. the result is always 2. I think because of of the " ' " signs the count-method don't count the number of the values in the result XML,
but the count of the properties. It is possible to transform the xpath statement to a xquery?
Can somebody help me please.