How to trim (leading and trailing spaces) the variables in the the assertion section of SoapUI/ReadyAPI ?
Ex:
Input String : "Failure "
Output String : "Failure"
After some research, I got the XSLT/XPath method which does space trim of given variables in Assertion window.
Method name: normalize-space()
Usage would be like:
normalize-space(//Results[1]/ResultSet[1]/Row[1]/PAYMNT_RQST.PAYMNT_STAT_CD[1])
normalize-space function collapses whitespace in a string. Specifically, it performs three steps:
#xD
), line feed (#xA
), and tab (#x9
) character with a single space (#x20
)