Forum Discussion
nmrao
12 years agoCommunity Hero
Hi,
Yes, that is possible to create uniquId and set it to JMSCorrelationID during runtime using groovy.
Add a groovy script step say GenerateCorrelationID before the request step with the following code:
Now in the request step chage the value to ${#Project#CORRELATIONID} for JMSCorrelationID of JMSHeaders. Note, that you may also change to test case level property as well if you want to.
Then run your TestCase and see. Hope this helps.
Regards,
Rao.
Yes, that is possible to create uniquId and set it to JMSCorrelationID during runtime using groovy.
Add a groovy script step say GenerateCorrelationID before the request step with the following code:
import java.util.UUID
def correlationId = String.valueOf(UUID.randomUUID())
testRunner.testCase.testSuite.project.setPropertyValue("CORRELATIONID", correlationId)
Now in the request step chage the value to ${#Project#CORRELATIONID} for JMSCorrelationID of JMSHeaders. Note, that you may also change to test case level property as well if you want to.
Then run your TestCase and see. Hope this helps.
Regards,
Rao.