Hi,
I have a query that is a count here is my example.
NumberOfDownThings: count(mapped/Tabular/dLpAp/table/row[osiOper="dis" or osiUage !="active" or ipAddr="0.0.0.0"])
I would expect that this would return an integer I could compare but it doesn't seem to.
What happens when I try to use this in a query as shown below
analyze
query NumberOfDownThings()
asset $value > 0
Is that I get an error in the form:
0.0 > 0
Why is my query returning a string and not a number that I can use?
I have tried using expr in from of it e.g.
assert [expr $value] > 0
but doesn't totally solve my problem.
Any suggestions how my count query can return a number to compare against 0???
Regards,
Elaine.
Answer by KumarS · Apr 26, 2010 at 05:36 PM
It is alll working properly. Itest will automatically do a numeric comparison in this case. It will convert 0.0 to 0 and then compare. It just so happens that 0.0 is zero and therefore not greater than zero. When creating an execution issue, ITest simply prints the values as they were so that it is easy for the user to see what could possibly be wrong with the expression.
Copyright 2008- Spirent Communications, all rights reserved. Terms and Conditions.