Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SOAPUI: timeStamp using groovy script

Tags:

groovy

soapui

I have a requirement to parameter the time stamp in my SOAP Request. I'm planning to write groovy test step for the same. Could you please help on the same.

<timeStamp>2017-10-11T01:51:08.410-05:00</timeStamp>
like image 873
VISHVAMBRUTHJAVAGALTHIMMEGOWDA Avatar asked Dec 11 '22 09:12

VISHVAMBRUTHJAVAGALTHIMMEGOWDA


1 Answers

SoapUI allows to write inline script with in soap request and do not have to write a Groovy Script test step separately.

All you need to do is modify your timestamp request element to as below:

<timeStamp>${= new Date().format("yyyy-MM-dd'T'HH:mm:ss.SSSZ") }</timestamp>
like image 139
Rao Avatar answered Feb 20 '23 07:02

Rao