Monday, August 18, 2014

SoapUI - Groovy Hints

Save HTTP Raw Request (in script assertion):
def rawRequest = new String( messageExchange.getRawRequestData() )



TestRunner Results:

All:
for( r in testRunner.results )
{
log.info("Name" +r.testStep.name)
log.info("SLA" + r.timeTaken)
log.info("Status" + r.status)
}

Step number # (starting from 0):
log.info testRunner.results[3].testStep.name





TimeStamp:

long timestamp = System.currentTimeMillis();

String a = timestamp.toString()
long b = a.toLong()



Remove all special characters:

.replaceAll("[^a-zA-Z0-9 ]+"," ")


1 comment: