Forum Discussion
Sean_Paterson
16 years agoOccasional Contributor
Hi Ole,
Many thanks for your quick reply. I tried your suggestion and it worked. I inserted a Groovy Script as the first test step, called "Set the username", with just the one line of script to initialise and define the 'dynamic' username value to be persisted down through all the test steps as follows :
def myusername = "MySoapUITester" + (int)(Math.random()*10)
I then modified the property transfer test step before the test requets step to move myusername, setting the Source = "Set the username" and Property = "Result" and setting the Target as normal to my test request step's request property.
Thanks again.
Sean
Many thanks for your quick reply. I tried your suggestion and it worked. I inserted a Groovy Script as the first test step, called "Set the username", with just the one line of script to initialise and define the 'dynamic' username value to be persisted down through all the test steps as follows :
def myusername = "MySoapUITester" + (int)(Math.random()*10)
I then modified the property transfer test step before the test requets step to move myusername, setting the Source = "Set the username" and Property = "Result" and setting the Target as normal to my test request step's request property.
Thanks again.
Sean