How to trim (leading and trailing spaces) the variables in the the assertion section of SoapUI/ReadyAPI ?
Ex:
Input String : "Failure "
Output String : "Failure"
Use trim for trailing spaces. Use replace to get rid of spaces.
def trimExample = "Some string to be trimmed. ";
def trimmed = trimExample.trim();
def removeSpacesExample = "Some String To Lose All Spaces."
def removedSpaces = removeSpacesExample.replace(' ', '');
Use log.info(varName) to see the effect.