Forum Discussion
balak84
13 years agoOccasional Contributor
Hi,
If it is the value "722a6f83-d583-4268-8401-732fc6ea1666" that you want to transfer to a Test request , then you can capture this using a Groovy script say "GS1"
Once you have this value captured then you can return the value from the Groovy script using << Return variable >>. This will return the value from the Groovy script.
ex:
Say you have captured "722a6f83-d583-4268-8401-732fc6ea1666" in a variable "var1". Then,
var1 = 722a6f83-d583-4268-8401-732fc6ea1666
So,
return var1 will return 722a6f83-d583-4268-8401-732fc6ea1666.
Now, use the Property Transfer step and define a Transfer variable inside it.
For the Transfer variable,
Source: GS1 ==> Groovy Script
Property: result (can be selected from the drop down)
Target: Test Request step to which the value has to be transferred
Property: Property within the Test request where the transferred value has to land (for this the Property should be defined as a pre requisite within the Test Request)
Also, in case when you get the value << 722a6f83-d583-4268-8401-732fc6ea1666 >> if you have the value coming as << "722a6f83-d583-4268-8401-732fc6ea1666" >> then in the same groovy use the "split" logic and have the << " " >> removed. Post that you can rerun the variable from the same groovy step as mentioned earlier in this post.
Hope this helps!!!
Regards.
If it is the value "722a6f83-d583-4268-8401-732fc6ea1666" that you want to transfer to a Test request , then you can capture this using a Groovy script say "GS1"
Once you have this value captured then you can return the value from the Groovy script using << Return variable >>. This will return the value from the Groovy script.
ex:
Say you have captured "722a6f83-d583-4268-8401-732fc6ea1666" in a variable "var1". Then,
var1 = 722a6f83-d583-4268-8401-732fc6ea1666
So,
return var1 will return 722a6f83-d583-4268-8401-732fc6ea1666.
Now, use the Property Transfer step and define a Transfer variable inside it.
For the Transfer variable,
Source: GS1 ==> Groovy Script
Property: result (can be selected from the drop down)
Target: Test Request step to which the value has to be transferred
Property: Property within the Test request where the transferred value has to land (for this the Property should be defined as a pre requisite within the Test Request)
Also, in case when you get the value << 722a6f83-d583-4268-8401-732fc6ea1666 >> if you have the value coming as << "722a6f83-d583-4268-8401-732fc6ea1666" >> then in the same groovy use the "split" logic and have the << " " >> removed. Post that you can rerun the variable from the same groovy step as mentioned earlier in this post.
Hope this helps!!!

Regards.