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.
Vishvamburth, please check the solution to see if that helps.
- Rao
2 Answers
9
votes
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>
4
votes
You Can try this:
Add a groovy step
String startTime = new Date().format("yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
testRunner.testCase.setPropertyValue( "TimeStamp", startTime )
log.info(startTime);
You can set testcase level property.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more