Forum Discussion
GiscardN
12 years agoFrequent Contributor
Hi,
This is an example where you define an array in your LoadTest Setup Script and put it in the context:
def array1 = ["a", "b", "c"]
context["myarray"] = array1
Then in a script in your TestCase you can retrieve it as follows:
def arr = context.LoadTestContext["myarray"]
But another way to go about this is to use a DataSource in your TestCase: http://www.soapui.org/Data-Driven-Testing/datasources.html
Notice the "Shared" configuration option to share the DataSource between running threads during your LoadTest. That's another option to explore depending on your testing scenario.
Regards,
Giscard
SmartBear Support
This is an example where you define an array in your LoadTest Setup Script and put it in the context:
def array1 = ["a", "b", "c"]
context["myarray"] = array1
Then in a script in your TestCase you can retrieve it as follows:
def arr = context.LoadTestContext["myarray"]
But another way to go about this is to use a DataSource in your TestCase: http://www.soapui.org/Data-Driven-Testing/datasources.html
Notice the "Shared" configuration option to share the DataSource between running threads during your LoadTest. That's another option to explore depending on your testing scenario.
Regards,
Giscard
SmartBear Support