Hello,
One way to do this would be using XPaths rounding function. For instance, say I have a response containing the value "3.14159265358979323846064338327950" and I need to assert that it would round to 3.14 (with a 2 decimal precision). Since XPath only has a round function that rounds to the nearest integer (at least I didn't find any other function now) I would simply start by multiplying the value with 100 and then rounding it. Once rounded, divide by 100 again. The value I then compare to is 3.14 So the XPath for this might look like:
round(//path/to/value/number() * 100) div 100
Hope this helps you! The value you test against can be either static or a Property Expansion.
Regards,
Dain
eviware.com