On 26/07/06, Yanroy <[EMAIL PROTECTED]> wrote:

The website I'm working on presents a series of questions to the user that
can be multiple-choice (radio buttons) or open-ended (text field).  I'm

Are these randomly generated, or does the same URL always generate the
same questions?

trying to create a JMeter test that will navigate through an entire set of
these questions.  Each question has associated with it a number of helpful
messages if you get the answer incorrect, some of which are actually
questions in and of themselves designed to break the question down into
simpler sub-questions to assist the user in getting it correct.  For a
first-draft version of this test, I'd just like to be able to iterate
through all the questions and ignore the hints, which requires that I get
the question right on the first try - it's easy enough for me to get a CSV
file or the like with the problem ID's and correct answers to read in.  My
problem/question is this: how do I load the values in a useful way?  I'm

If you know - or can define - the order in which the questions will be
presented, then just order the items in the file.

already using the CSV data set config element to load my usernames and
passwords (so each thread has a unique user), but I need some more complex
behavior than this.  Is there any way to treat a CSV file as a sort of map,
such that I can use a regex to extract the problem ID from the webpage and
use that as a key to look up the correct answer?

No - the CSV data file is read a line at a time, and split into the variables.

Failing that, is there any
way for me to get some slightly different behavior out of the CSV config
element such that all threads will use the same data and each will have its
own independent "pointer" to its current row, and this pointer can be
incremented by a loop controller (or some other element inside a loop
controller)?

Not at present.  You could try using multiple copies of the CSV data
set, each with a different file, and use the thread number function
get the current thread number. Try it with a simple test with two
threads.

Otherwise, it would mean changing the CSV Data set code to add a new option.

The goal with this second approach is to be able to have all
the threads have all the answers and iterate through the answer set every
time the loop controller moves on to a new problem.

I'd greatly appreciate any help with this problem.  If someone has a
better/possible way to accomplish my goal using a technique different than
the two I outlined above, I'm open to suggestions on that front as well.
Also, if this functionality is simply impossible with the current program,
would it be terribly difficult for me to add it?  Thank you all very much.

If you have some Java experience, it should not be too difficult to
add the per-thread functionality to CSV Data set.

Or you could perhaps use the BeanShell pre-processor or function to
implement the mapping between question and answer - perhaps create the
mapping using the startup file.

Also, just had an idea: you might be able to use a property file to
map between question and answer, and then use the __P() function to
read the value.
This depends on whether the questions and answers can be successfully
stored as Java properties. JMeter supports additional property files,
so the info can be held separately.


PS - According to the JMeter site, #jmeter on irc.us.freenode.net is the
official channel... it seems to be totally deserted.  What's up with that?
--
View this message in context: 
http://www.nabble.com/complex-page-navigation-problems-tf2006048.html#a5510819
Sent from the JMeter - User forum 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]

Reply via email to