You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by vdanu <vd...@symcor.com> on 2007/08/21 20:30:04 UTC

Inserting multiple fields from file

I am testing a Web Service, and want to perform a load test with unique
variables for each request. Having three variables to substitute, I am
thinking of having my variables in a file, where each line has three fields:
accountNumber, startDate, and endDate, delimited by commas. These should
substitute <accountNumber>, <startDate>, and <endDate> elements in the SOAP
request.

How do I substitute multiple fields into the SOAP request?

If I have thousands of lines in the file, how will it affect the overhead?

Is there a better way to achieve what I want to do?

Regards,
Val
-- 
View this message in context: http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12260520
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Inserting multiple fields from file

Posted by sebb <se...@gmail.com>.
Just set the thread group to loop n times - each sample will get a new line.

I suggest you set up a simple test case - e.g. using a Java Request
Sampler in which you can use one of more variables - and experiment.

S.
On 22/08/07, vdanu <vd...@symcor.com> wrote:
>
> How about the loop?
> To maintain the uniqueness of each request, is it possible to assign each
> loop to open a different file containing a different set of data? I am
> thinking of something similar to supplying a 'filename prefix' and then each
> loop will open the next sequential index, e.g. filename1, filename2,
> filename3, etc. ?
>
> Can we use the logic controller to do this?
> A sample will help.
>
>
>
> sebb-2 wrote:
> >
> > On 21/08/07, vdanu <vd...@symcor.com> wrote:
> >>
> >> > The file is only opened once, but each thread will use a different
> >> > line from the file.
> >>
> >> That is interesting! I thought that each thread will read and repeat to
> >> use
> >> the lines from the file one by one from the beginning.
> >> Which line is being picked next? Is it randomized? or sequential?
> >
> > Sequential.
> >
> >> If I have a file with 1000 lines, running 10 threads, does it mean that
> >> each
> >> thread will use only 100 lines?
> >
> > On average, yes, but if one thread runs faster or slower it may use
> > more or fewer lines.
> >
> >> Is this scheme documented anywhere?
> >>
> >
> > Not yet.
> >
> >>
> >> sebb-2 wrote:
> >> >
> >> > On 21/08/07, vdanu <vd...@symcor.com> wrote:
> >> >>
> >> >> Thanks for the prompt response!
> >> >> Using the CSV dataset looks quite simple to do.
> >> >>
> >> >> Now, if I define multiple users (threads), will that mean that each
> >> user
> >> >> will use the same set of data? So the set of requests from different
> >> >> users
> >> >> will be coming from a single CSV dataset? Is there any way or
> >> possibility
> >> >> for different users to use different CSV files? We want each request
> >> to
> >> >> be
> >> >> unique, i.e. to target a different row in the database every time.
> >> >
> >> > The file is only opened once, but each thread will use a different
> >> > line from the file.
> >> >
> >> >> Thanks for the suggestion to use the counter, but I am not sure if it
> >> is
> >> >> suitable to use, since the values of the variables are not sequential,
> >> >> and
> >> >> there is no guarantee that a certain value exists in the database.
> >> >> We are thinking to extract values randomly from the database (of up to
> >> 50
> >> >> million rows), get rid of the no hits, and put them into the CSV
> >> >> dataset(s).
> >> >>
> >> >> Thanks and regards,
> >> >> Val
> >> >>
> >> >>
> >> >> sebb-2 wrote:
> >> >> >
> >> >> > On 21/08/07, vdanu <vd...@symcor.com> wrote:
> >> >> >>
> >> >> >> I am testing a Web Service, and want to perform a load test with
> >> >> unique
> >> >> >> variables for each request. Having three variables to substitute, I
> >> am
> >> >> >> thinking of having my variables in a file, where each line has
> >> three
> >> >> >> fields:
> >> >> >> accountNumber, startDate, and endDate, delimited by commas. These
> >> >> should
> >> >> >> substitute <accountNumber>, <startDate>, and <endDate> elements in
> >> the
> >> >> >> SOAP
> >> >> >> request.
> >> >> >>
> >> >> >> How do I substitute multiple fields into the SOAP request?
> >> >> >
> >> >> > Use the CSV DataSet with the variables AC, SD, ED (for example).
> >> >> >
> >> >> > Then use ${AC} ${SD} and ${ED} as appropriate in the SOAP request.
> >> >> >
> >> >> > The request must be on the screen, not in a file, as JMeter does not
> >> >> > do file substitutions.
> >> >> >
> >> >> >> If I have thousands of lines in the file, how will it affect the
> >> >> >> overhead?
> >> >> >
> >> >> > No, CSV DataSet reads a line at a time.
> >> >> >
> >> >> >> Is there a better way to achieve what I want to do?
> >> >> >
> >> >> > Instead of reading from a file, you might be able to use Counters to
> >> >> > generate the numbers in conjunction with some fixed text. Depends on
> >> >> > what restrictions need to be placed on the values of the variables.
> >> >> >
> >> >> >> Regards,
> >> >> >> Val
> >> >> >> --
> >> >> >> View this message in context:
> >> >> >>
> >> >>
> >> http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12260520
> >> >> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >> >> >>
> >> >> >>
> >> >> >>
> >> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> >> >> For additional commands, e-mail:
> >> jmeter-user-help@jakarta.apache.org
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> ---------------------------------------------------------------------
> >> >> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> >> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12261320
> >> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >> >>
> >> >>
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12264302
> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12274871
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Inserting multiple fields from file

Posted by vdanu <vd...@symcor.com>.
How about the loop? 
To maintain the uniqueness of each request, is it possible to assign each
loop to open a different file containing a different set of data? I am
thinking of something similar to supplying a 'filename prefix' and then each
loop will open the next sequential index, e.g. filename1, filename2,
filename3, etc. ?

Can we use the logic controller to do this?
A sample will help.



sebb-2 wrote:
> 
> On 21/08/07, vdanu <vd...@symcor.com> wrote:
>>
>> > The file is only opened once, but each thread will use a different
>> > line from the file.
>>
>> That is interesting! I thought that each thread will read and repeat to
>> use
>> the lines from the file one by one from the beginning.
>> Which line is being picked next? Is it randomized? or sequential?
> 
> Sequential.
> 
>> If I have a file with 1000 lines, running 10 threads, does it mean that
>> each
>> thread will use only 100 lines?
> 
> On average, yes, but if one thread runs faster or slower it may use
> more or fewer lines.
> 
>> Is this scheme documented anywhere?
>>
> 
> Not yet.
> 
>>
>> sebb-2 wrote:
>> >
>> > On 21/08/07, vdanu <vd...@symcor.com> wrote:
>> >>
>> >> Thanks for the prompt response!
>> >> Using the CSV dataset looks quite simple to do.
>> >>
>> >> Now, if I define multiple users (threads), will that mean that each
>> user
>> >> will use the same set of data? So the set of requests from different
>> >> users
>> >> will be coming from a single CSV dataset? Is there any way or
>> possibility
>> >> for different users to use different CSV files? We want each request
>> to
>> >> be
>> >> unique, i.e. to target a different row in the database every time.
>> >
>> > The file is only opened once, but each thread will use a different
>> > line from the file.
>> >
>> >> Thanks for the suggestion to use the counter, but I am not sure if it
>> is
>> >> suitable to use, since the values of the variables are not sequential,
>> >> and
>> >> there is no guarantee that a certain value exists in the database.
>> >> We are thinking to extract values randomly from the database (of up to
>> 50
>> >> million rows), get rid of the no hits, and put them into the CSV
>> >> dataset(s).
>> >>
>> >> Thanks and regards,
>> >> Val
>> >>
>> >>
>> >> sebb-2 wrote:
>> >> >
>> >> > On 21/08/07, vdanu <vd...@symcor.com> wrote:
>> >> >>
>> >> >> I am testing a Web Service, and want to perform a load test with
>> >> unique
>> >> >> variables for each request. Having three variables to substitute, I
>> am
>> >> >> thinking of having my variables in a file, where each line has
>> three
>> >> >> fields:
>> >> >> accountNumber, startDate, and endDate, delimited by commas. These
>> >> should
>> >> >> substitute <accountNumber>, <startDate>, and <endDate> elements in
>> the
>> >> >> SOAP
>> >> >> request.
>> >> >>
>> >> >> How do I substitute multiple fields into the SOAP request?
>> >> >
>> >> > Use the CSV DataSet with the variables AC, SD, ED (for example).
>> >> >
>> >> > Then use ${AC} ${SD} and ${ED} as appropriate in the SOAP request.
>> >> >
>> >> > The request must be on the screen, not in a file, as JMeter does not
>> >> > do file substitutions.
>> >> >
>> >> >> If I have thousands of lines in the file, how will it affect the
>> >> >> overhead?
>> >> >
>> >> > No, CSV DataSet reads a line at a time.
>> >> >
>> >> >> Is there a better way to achieve what I want to do?
>> >> >
>> >> > Instead of reading from a file, you might be able to use Counters to
>> >> > generate the numbers in conjunction with some fixed text. Depends on
>> >> > what restrictions need to be placed on the values of the variables.
>> >> >
>> >> >> Regards,
>> >> >> Val
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12260520
>> >> >> Sent from the JMeter - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> >> >> For additional commands, e-mail:
>> jmeter-user-help@jakarta.apache.org
>> >> >>
>> >> >>
>> >> >
>> >> >
>> ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> >> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12261320
>> >> Sent from the JMeter - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12264302
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12274871
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Inserting multiple fields from file

Posted by sebb <se...@gmail.com>.
On 21/08/07, vdanu <vd...@symcor.com> wrote:
>
> > The file is only opened once, but each thread will use a different
> > line from the file.
>
> That is interesting! I thought that each thread will read and repeat to use
> the lines from the file one by one from the beginning.
> Which line is being picked next? Is it randomized? or sequential?

Sequential.

> If I have a file with 1000 lines, running 10 threads, does it mean that each
> thread will use only 100 lines?

On average, yes, but if one thread runs faster or slower it may use
more or fewer lines.

> Is this scheme documented anywhere?
>

Not yet.

>
> sebb-2 wrote:
> >
> > On 21/08/07, vdanu <vd...@symcor.com> wrote:
> >>
> >> Thanks for the prompt response!
> >> Using the CSV dataset looks quite simple to do.
> >>
> >> Now, if I define multiple users (threads), will that mean that each user
> >> will use the same set of data? So the set of requests from different
> >> users
> >> will be coming from a single CSV dataset? Is there any way or possibility
> >> for different users to use different CSV files? We want each request to
> >> be
> >> unique, i.e. to target a different row in the database every time.
> >
> > The file is only opened once, but each thread will use a different
> > line from the file.
> >
> >> Thanks for the suggestion to use the counter, but I am not sure if it is
> >> suitable to use, since the values of the variables are not sequential,
> >> and
> >> there is no guarantee that a certain value exists in the database.
> >> We are thinking to extract values randomly from the database (of up to 50
> >> million rows), get rid of the no hits, and put them into the CSV
> >> dataset(s).
> >>
> >> Thanks and regards,
> >> Val
> >>
> >>
> >> sebb-2 wrote:
> >> >
> >> > On 21/08/07, vdanu <vd...@symcor.com> wrote:
> >> >>
> >> >> I am testing a Web Service, and want to perform a load test with
> >> unique
> >> >> variables for each request. Having three variables to substitute, I am
> >> >> thinking of having my variables in a file, where each line has three
> >> >> fields:
> >> >> accountNumber, startDate, and endDate, delimited by commas. These
> >> should
> >> >> substitute <accountNumber>, <startDate>, and <endDate> elements in the
> >> >> SOAP
> >> >> request.
> >> >>
> >> >> How do I substitute multiple fields into the SOAP request?
> >> >
> >> > Use the CSV DataSet with the variables AC, SD, ED (for example).
> >> >
> >> > Then use ${AC} ${SD} and ${ED} as appropriate in the SOAP request.
> >> >
> >> > The request must be on the screen, not in a file, as JMeter does not
> >> > do file substitutions.
> >> >
> >> >> If I have thousands of lines in the file, how will it affect the
> >> >> overhead?
> >> >
> >> > No, CSV DataSet reads a line at a time.
> >> >
> >> >> Is there a better way to achieve what I want to do?
> >> >
> >> > Instead of reading from a file, you might be able to use Counters to
> >> > generate the numbers in conjunction with some fixed text. Depends on
> >> > what restrictions need to be placed on the values of the variables.
> >> >
> >> >> Regards,
> >> >> Val
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12260520
> >> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >> >>
> >> >>
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12261320
> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12264302
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Inserting multiple fields from file

Posted by vdanu <vd...@symcor.com>.
> The file is only opened once, but each thread will use a different
> line from the file.

That is interesting! I thought that each thread will read and repeat to use
the lines from the file one by one from the beginning.
Which line is being picked next? Is it randomized? or sequential?
If I have a file with 1000 lines, running 10 threads, does it mean that each
thread will use only 100 lines?
Is this scheme documented anywhere?



sebb-2 wrote:
> 
> On 21/08/07, vdanu <vd...@symcor.com> wrote:
>>
>> Thanks for the prompt response!
>> Using the CSV dataset looks quite simple to do.
>>
>> Now, if I define multiple users (threads), will that mean that each user
>> will use the same set of data? So the set of requests from different
>> users
>> will be coming from a single CSV dataset? Is there any way or possibility
>> for different users to use different CSV files? We want each request to
>> be
>> unique, i.e. to target a different row in the database every time.
> 
> The file is only opened once, but each thread will use a different
> line from the file.
> 
>> Thanks for the suggestion to use the counter, but I am not sure if it is
>> suitable to use, since the values of the variables are not sequential,
>> and
>> there is no guarantee that a certain value exists in the database.
>> We are thinking to extract values randomly from the database (of up to 50
>> million rows), get rid of the no hits, and put them into the CSV
>> dataset(s).
>>
>> Thanks and regards,
>> Val
>>
>>
>> sebb-2 wrote:
>> >
>> > On 21/08/07, vdanu <vd...@symcor.com> wrote:
>> >>
>> >> I am testing a Web Service, and want to perform a load test with
>> unique
>> >> variables for each request. Having three variables to substitute, I am
>> >> thinking of having my variables in a file, where each line has three
>> >> fields:
>> >> accountNumber, startDate, and endDate, delimited by commas. These
>> should
>> >> substitute <accountNumber>, <startDate>, and <endDate> elements in the
>> >> SOAP
>> >> request.
>> >>
>> >> How do I substitute multiple fields into the SOAP request?
>> >
>> > Use the CSV DataSet with the variables AC, SD, ED (for example).
>> >
>> > Then use ${AC} ${SD} and ${ED} as appropriate in the SOAP request.
>> >
>> > The request must be on the screen, not in a file, as JMeter does not
>> > do file substitutions.
>> >
>> >> If I have thousands of lines in the file, how will it affect the
>> >> overhead?
>> >
>> > No, CSV DataSet reads a line at a time.
>> >
>> >> Is there a better way to achieve what I want to do?
>> >
>> > Instead of reading from a file, you might be able to use Counters to
>> > generate the numbers in conjunction with some fixed text. Depends on
>> > what restrictions need to be placed on the values of the variables.
>> >
>> >> Regards,
>> >> Val
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12260520
>> >> Sent from the JMeter - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12261320
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12264302
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Inserting multiple fields from file

Posted by sebb <se...@gmail.com>.
On 21/08/07, vdanu <vd...@symcor.com> wrote:
>
> Thanks for the prompt response!
> Using the CSV dataset looks quite simple to do.
>
> Now, if I define multiple users (threads), will that mean that each user
> will use the same set of data? So the set of requests from different users
> will be coming from a single CSV dataset? Is there any way or possibility
> for different users to use different CSV files? We want each request to be
> unique, i.e. to target a different row in the database every time.

The file is only opened once, but each thread will use a different
line from the file.

> Thanks for the suggestion to use the counter, but I am not sure if it is
> suitable to use, since the values of the variables are not sequential, and
> there is no guarantee that a certain value exists in the database.
> We are thinking to extract values randomly from the database (of up to 50
> million rows), get rid of the no hits, and put them into the CSV dataset(s).
>
> Thanks and regards,
> Val
>
>
> sebb-2 wrote:
> >
> > On 21/08/07, vdanu <vd...@symcor.com> wrote:
> >>
> >> I am testing a Web Service, and want to perform a load test with unique
> >> variables for each request. Having three variables to substitute, I am
> >> thinking of having my variables in a file, where each line has three
> >> fields:
> >> accountNumber, startDate, and endDate, delimited by commas. These should
> >> substitute <accountNumber>, <startDate>, and <endDate> elements in the
> >> SOAP
> >> request.
> >>
> >> How do I substitute multiple fields into the SOAP request?
> >
> > Use the CSV DataSet with the variables AC, SD, ED (for example).
> >
> > Then use ${AC} ${SD} and ${ED} as appropriate in the SOAP request.
> >
> > The request must be on the screen, not in a file, as JMeter does not
> > do file substitutions.
> >
> >> If I have thousands of lines in the file, how will it affect the
> >> overhead?
> >
> > No, CSV DataSet reads a line at a time.
> >
> >> Is there a better way to achieve what I want to do?
> >
> > Instead of reading from a file, you might be able to use Counters to
> > generate the numbers in conjunction with some fixed text. Depends on
> > what restrictions need to be placed on the values of the variables.
> >
> >> Regards,
> >> Val
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12260520
> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12261320
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Inserting multiple fields from file

Posted by vdanu <vd...@symcor.com>.
Thanks for the prompt response!
Using the CSV dataset looks quite simple to do.

Now, if I define multiple users (threads), will that mean that each user
will use the same set of data? So the set of requests from different users
will be coming from a single CSV dataset? Is there any way or possibility
for different users to use different CSV files? We want each request to be
unique, i.e. to target a different row in the database every time.

Thanks for the suggestion to use the counter, but I am not sure if it is
suitable to use, since the values of the variables are not sequential, and
there is no guarantee that a certain value exists in the database. 
We are thinking to extract values randomly from the database (of up to 50
million rows), get rid of the no hits, and put them into the CSV dataset(s).

Thanks and regards,
Val


sebb-2 wrote:
> 
> On 21/08/07, vdanu <vd...@symcor.com> wrote:
>>
>> I am testing a Web Service, and want to perform a load test with unique
>> variables for each request. Having three variables to substitute, I am
>> thinking of having my variables in a file, where each line has three
>> fields:
>> accountNumber, startDate, and endDate, delimited by commas. These should
>> substitute <accountNumber>, <startDate>, and <endDate> elements in the
>> SOAP
>> request.
>>
>> How do I substitute multiple fields into the SOAP request?
> 
> Use the CSV DataSet with the variables AC, SD, ED (for example).
> 
> Then use ${AC} ${SD} and ${ED} as appropriate in the SOAP request.
> 
> The request must be on the screen, not in a file, as JMeter does not
> do file substitutions.
> 
>> If I have thousands of lines in the file, how will it affect the
>> overhead?
> 
> No, CSV DataSet reads a line at a time.
> 
>> Is there a better way to achieve what I want to do?
> 
> Instead of reading from a file, you might be able to use Counters to
> generate the numbers in conjunction with some fixed text. Depends on
> what restrictions need to be placed on the values of the variables.
> 
>> Regards,
>> Val
>> --
>> View this message in context:
>> http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12260520
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12261320
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Inserting multiple fields from file

Posted by sebb <se...@gmail.com>.
On 21/08/07, vdanu <vd...@symcor.com> wrote:
>
> I am testing a Web Service, and want to perform a load test with unique
> variables for each request. Having three variables to substitute, I am
> thinking of having my variables in a file, where each line has three fields:
> accountNumber, startDate, and endDate, delimited by commas. These should
> substitute <accountNumber>, <startDate>, and <endDate> elements in the SOAP
> request.
>
> How do I substitute multiple fields into the SOAP request?

Use the CSV DataSet with the variables AC, SD, ED (for example).

Then use ${AC} ${SD} and ${ED} as appropriate in the SOAP request.

The request must be on the screen, not in a file, as JMeter does not
do file substitutions.

> If I have thousands of lines in the file, how will it affect the overhead?

No, CSV DataSet reads a line at a time.

> Is there a better way to achieve what I want to do?

Instead of reading from a file, you might be able to use Counters to
generate the numbers in conjunction with some fixed text. Depends on
what restrictions need to be placed on the values of the variables.

> Regards,
> Val
> --
> View this message in context: http://www.nabble.com/Inserting-multiple-fields-from-file-tf4306982.html#a12260520
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org