Forum Discussion

MMcWhinney's avatar
MMcWhinney
New Contributor
12 years ago

[Resolved] Script assertion

This is probably just a groovy noob question ...

I have a JDBC Request step which has a SELECT statement that returns a single row. In that row is a column with a floating point number. I want to assert that the number is greater than a specific value.

I set a Script Assertion which created this script:

def holder = new XmlHolder( messageExchange.responseContentAsXml )
def node = holder.getDomNode( "//Results[1]/ResultSet[1]/Row[1]/COUNT[1]" )
assert node != null

I want to replace that last line with something like the following, but I don't know what XXX should be.

assert node.XXX > 100.0