On 26/09/2008, Mark24 <[EMAIL PROTECTED]> wrote: > > Thanks for your reply sebb, you are very informative (i've been reading your > answer to questions quite often over the last 3 days ive been using JMeter). > > My grand plan is to regression test my company's MS web services by loging > in once to get the security id, then spawn multiple virtual users to work > together to call the other WS methods using a collection of inputs from a > database. certain values from the responses are planned to be inserted into > a database to later run some sql to compare these values against a test > baseline database. > > I was using one thread group which was spawning a single user to to get the > security id, then the second thread group would spawn n virtual users. >
OK, it was not clear that you wanted to use a single id in multiple threads. In which case, use two thread groups, and set them to run one after another. Extract the id you want to use, and save it as a JMeter Property using the function: http://jakarta.apache.org/jmeter/usermanual/functions.html#__setProperty You can then use the __P() function to retrieve the value in the second thread group. Or if you already have a lot of samplers using a variable, just add a user parameters pre-processor to the first one and copy the property to the variable there. > I'm possibly approaching the solution to my problem incorrectly so please > comment or point me to some reading material. My Jmeter textbook has been > order on Amazon but until then, the jmeter docs and forums like this are my > friends. There's also quite a lot of information on the Wiki. > Thanks again Sebb, > > Mark > > > sebb-2-2 wrote: > > > > On 26/09/2008, Mark24 <[EMAIL PROTECTED]> wrote: > >> > >> In Jmeter 2.3.2, how do I pass a value obtained in "Thread Group 1" > >> (with > >> "XPath Extractor" from a "WebService(SOAP) Request") to "Thread Group 2" > >> for > >> use as input to "WebService(SOAP) Request" > >> > >> Graphically: > >> > >> "Thread Group 1" > >> "WebService(SOAP) Request" //login() WS method which returns a > >> security > >> ID > >> "XPath Extractor" //extract security ID to security_ID variable > >> "Thread Group 2" > >> "WebService(SOAP) Request" //use ${security_ID} as a parameter to > >> this > >> Search() WS method > >> > >> > >> Variable security_ID declared in "Thread Group 1"'s "XPath Extractor" > >> seems > >> to be very narrowly scoped as "${security_ID}" is literally used as > >> input to > >> "Thread Group 2"'s "WebService(SOAP) Request" instead of the value of > >> ${security_ID}. > >> > >> I've tried declaring the security_ID variable in "Test Plan to use" but > >> this > >> doesn't work (${security_ID} resolves to the value i set during > >> declaration > >> instead of the extracted value). > > > > Why not use the same Thread Group for the two SOAP requests? > > > > e.g. > > > > Thread Group > > + SOAP > > + + XPath > > + SOAP using variable > > > > If you want to run multiple requests with the same variable, just add > > them at the end, or enclose in a loop: > > > > Thread Group > > + SOAP > > + + XPath > > + Loop > > + + SOAP using variable > > > >> Thanks for any help, > >> Mark > >> > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/how-do-I-pass-a-value-obtained-in-%22Thread-Group-1%22-%28with-%22XPath-Extractor%22-from-a-%22WebService%28SOAP%29-Request%22%29-to-%22Thread-Group-2%22-for-use-as-input-to-%22WebService%28SOAP%29-Request%22-tp19683794p19683794.html > >> Sent from the JMeter - User mailing list archive at Nabble.com. > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > -- > View this message in context: > http://www.nabble.com/how-do-I-pass-a-value-obtained-in-%22Thread-Group-1%22-%28with-%22XPath-Extractor%22-from-a-%22WebService%28SOAP%29-Request%22%29-to-%22Thread-Group-2%22-for-use-as-input-to-%22WebService%28SOAP%29-Request%22-tp19683794p19686226.html > > Sent from the JMeter - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

