fb36
16 years agoNew Contributor
How to pass java object to load test threads?
I am trying to create a load test.
I have a script code that creates a socket connection object (non-soap).
I want that code to run only once (not re-run for each thread)
and all threads to use that same object to send messages to the test system.
So if I put my script code into "Setup script" window of the load test then
it will run only once when the load test started?
Also how to pass my java connection object to threads?
I tried using context.setProperty("connectionObj")/context.getProperty("connectionObj")
to pass but it does not seem to be working.
I have a script code that creates a socket connection object (non-soap).
I want that code to run only once (not re-run for each thread)
and all threads to use that same object to send messages to the test system.
So if I put my script code into "Setup script" window of the load test then
it will run only once when the load test started?
Also how to pass my java connection object to threads?
I tried using context.setProperty("connectionObj")/context.getProperty("connectionObj")
to pass but it does not seem to be working.