Forum Discussion
SmartBear_Suppo
Alumni
15 years agoHello,
To do this, probably the easiest way is to create script assertion. Basically you need to
extract the value from the response and check it. Something like:
Hope this helps.
regards!
Predrag
/Smart Bear Sweden (eviware)
To do this, probably the easiest way is to create script assertion. Basically you need to
extract the value from the response and check it. Something like:
def attempts = context.expand( '${Your Test Step Name#Response#//root[1]/mapping_attempts[1]}' ) as Integer
assert attempts > 1 && attempts < 20
// or
// assert attempts >= 1 && attempts <= 20
// if you want to include 1 and 20
Hope this helps.
regards!
Predrag
/Smart Bear Sweden (eviware)