How to generate uuid for a soap script that is constant

Originally posted by Mathit on December 06, 2019

I use soap ui pro, need to generate a uuid for a testrun

I generate uuid by adding properties, store it in a variable

${=java.util.UUID.randomUUID()

When i use this in the script, it generates the correct value. I need to use the same id throughout the run. when I use the above command, each step is generating a new uuid. how do i overcome this issue.

Originally posted by nmrao on December 08, 2019

Set the value at custom project property so that same value can be used through out the project.

Originally posted by Mathit on December 09, 2019

I added at the project level and using it like this at two consecutive calls. Both places i see different uuids being used.

I added under project settings / properties like this. - ${=java.util.UUID.randomUUID()}

${#Project#uuidar}
“dae35c8e-97df-49a5-9fc3-d0bcad1db922”
“90a050ea-173e-4e59-aa6b-de9e91d91dcb”

Originally posted by Mathit on December 10, 2019

nmrao your reply to this post worked.

</t/how-to-transfer-result-of-groovy-script/684>