G'day Because they all run under one JVM all instances of the sampler within a JMeter server can share memory through static variables.
If you are familiar with static variables that should be enough to get you going. Ian Blavins Software performance specialist . TEMENOS The Banking Software Company . PeopleBuilding 2, Maylands Av Hemel Hempstead UK HP2 4NW . T: +44 (0) 1442 431 106 E: [email protected] . www.temenos.com . -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Paul Robinson Sent: Monday, 23 March 2009 2:59 PM To: [email protected] Subject: Custom Sampler: Force all setupTest methods to be invoked before runTest methods Hello, I have written a Custom Sampler by extending "AbstractJavaSamplerClient". My sampler is very simple, it just logs the method being invoked. If i run the sampler for 2 threads with "loop count" of 1, I see the following output: INFO 03/23, 02:49:18 hat.test.jms.test.DummySampler Constructor INFO 03/23, 02:49:18 hat.test.jms.test.DummySampler setupTest INFO 03/23, 02:49:18 hat.test.jms.test.DummySampler runTest INFO 03/23, 02:49:18 hat.test.jms.test.DummySampler Constructor INFO 03/23, 02:49:18 hat.test.jms.test.DummySampler setupTest INFO 03/23, 02:49:18 hat.test.jms.test.DummySampler runTest INFO 03/23, 02:49:18 hat.test.jms.test.DummySampler teardownTest INFO 03/23, 02:49:18 hat.test.jms.test.DummySampler teardownTest Here you will observe that the "runTest" method of the first thread is invoked before the "setupTest" of the 2nd thread. For my test I need to ensure that all threads have their setupTest method invoked before any of them have their "runTest" method ivoked. Does anyone know how I can do this? Thanks, Paul. Disclaimer: If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of TEMENOS. We recommend that you check this e-mail and any attachments against viruses. TEMENOS accepts no liability for any damage caused by any malicious code or virus transmitted by this e-mail. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

