On 20/01/2009, George Barnett <[email protected]> wrote: > Hi, > > I'm not being clear enough - sorry :) > > Each thread within the thread group will need access to a "pool" of > username tokens. The application I'm testing checks authentication, so each > thread represents a client needing to auth users, rather than a user itself. > > So, each thread within the thread group will start up and begin to cycle > through the list of usernames to authenticate. As each user is > authenticated, the returned token should be saved along with the username. > This is easy enough with a regex extractor, however, I'm not certain where > to store this. The thread group threads will also periodically recheck the > username/token with the tested application. > > A file doesn't feel right since there wont be uniqueness. > > My initial idea was to go with a BSF post processor and use a Javascript > Array indexed on username. It's not clear from the documentation if this is > possible though and I'm also hesitant to do the heavy lifting in Javascript > if there's a more efficient method available from within JMeter. >
JMeter assumes each thread is a single user, so does not have such support built-in. However, if there is a fixed number of user names, you could perhaps use variables along the lines of: USER1 TOKEN1 ... USERn TOKENn You'll probably need to use the __V() function to build the variable names. Otherwise, you will need to use some code as you suggest. But in either case it may be tricky to retest the names and tokens. With a suitable naming convention - and __V() - you might be able to use the For Each Controller to loop through all the values. > Regards, > > George > > > On 20/01/2009, at 8:21 PM, Fitzpatrick, Adrian wrote: > > > > > > Hi George, > > > > I would say best approach is to use a regular expression extractor to > extract > > token from response into a variable, and then use that variable whereever > the > > token is required in your script. > > > > - Adrian > > > > -----Original Message----- > > From: George Barnett [mailto:[email protected]] > > Sent: 20 January 2009 06:18 > > To: [email protected] > > Subject: Best method for saving login tokens > > > > > > ************************************* > > > > This e-mail has been received by the Revenue Internet e-mail service. (IP) > > > > ************************************* > > > > Hello, > > > > I'm currently writing a test plan for an application where the > > interactions are all via a soap api. In the test plan, I will be > > doing a SOAP call to authenticate a user. When this happens, I'm > > going to get a token back. I'd like to store this token for later use > > as the test should simulate periodically checking this token. > > > > What is the most efficient way to store this username/token > > combination for later use by the same thread group to periodically > > check the token with the system? > > > > Thanks in advance, > > > > George > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [email protected] > > For additional commands, e-mail: > [email protected] > > > > > > > > ************************ > > > > This message has been delivered to the Internet by the Revenue Internet > e-mail service (OP) > > > > ************************* > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [email protected] > > For additional commands, e-mail: > [email protected] > > > > > > -- > George Barnett > [email protected] > > > > --------------------------------------------------------------------- > 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]

