Buschfunk
11 years agoFrequent Contributor
Returning multiple results from a script
Hello,
In a Groovy script test step I'm defining several properties/variables.
Is it possible to put these URLs into something like an array, Map, Collection, HashMap or else and make this the script result so that I can access the different URLs in other test steps? Let's assume the following pseudo-code
In another test step I'd like to access e.g. urlList[2] to get https:8443//localhost.
Thanks,
Robert
In a Groovy script test step I'm defining several properties/variables.
def url_A = "http://localhost"
def url_B = "https://localhost"
def url_C = "https:8443//localhost"
Is it possible to put these URLs into something like an array, Map, Collection, HashMap or else and make this the script result so that I can access the different URLs in other test steps? Let's assume the following pseudo-code
def url_A = "http://localhost"
def url_B = "https://localhost"
def url_C = "https:8443//localhost"
def urlList = [url_A, url_B, url_C]
return urlList
In another test step I'd like to access e.g. urlList[2] to get https:8443//localhost.
Thanks,
Robert