As far as I can make out from a recent look at the code, CSVRead only
supports a single file.
Each thread can maintain its own position in the file, but they all access
the same file.

By contrast, StringFromFile supports as many files as needed, but each
reference in a test plan opens the file anew.

If you can combine the data into a single CSV file, you could use CSVRead.

Or if you can split it into individual files, you could use StringFromFile.

Otherwise, you might be able to use a parameter element to populate a
variable using _StringFromFile, and then use the regex function to split it
into other variables for use in the XML sampler, but I've not tried that.

Hope this helps a bit.

If not, it could be time to update one or both of the functions...

-- 
The opinions expressed herein are my own, and are not necessarily endorsed
by my employer ...
-----Original Message-----
From: Brian Lundell [mailto:[EMAIL PROTECTED]
Sent: 24 June 2003 18:31
To: JMeter Users List
Subject: __CSVRead always reads the same file.


Hi,
 
I'm having a problem with using __CSVRead in a loop.  Here is the construct
I am using:
 
|--- Loop Controller (set to run twice)
    |--- XMLSampler
    |--- RegExExtractor to get ParameterThatWorks
    |--- Interleave Controller
        |--- Request1 (Accesses File1.xml)
        |--- Request2 (Accesses File2.xml)
 
Request1 is as follows:
${__CSVRead(File1.xml,next())}
<some><xml><elements>
${__CSVRead(File1.xml,0)}${ParameterThatWorks}${__CSVRead(File1.xml,1)}
</elements></xml></some>
 
Request2 is identical, but contains File2.xml for File1.xml
 
The problem I am having is that both times through the loop, the values from
File1.xml are being sent, not File1.xml and then File2.xml (which is what I
want).
I have tried a few different constructs to accomplish, but with the same
results every time.
 
I'd gladly appreciate any suggestions on how to do this.
 
Thank you!
Brian

 


 Brian Lundell, Quality Assurance Specialist


 Time Industrial, Inc.
 An Outsourced Contractor Time and Cost Tracking Service.
 
----------------------------------------------------------------------------
-------------
 tel: 780.413.1521  fax: 780.413.0474
  http://www.TimeIndustrial.com <http://www.timeindustrial.com/>  

 
----------------------------------------------------------------------------
-------------
 This message and attached files, if any, is (are) intended only for the
addressee(s) and may 
 contain privileged or confidential information. Any unauthorized disclosure
is strictly prohibited. 
 If destined to our legal counsel, this transmission is privileged
communication as between an 
 attorney and its client.
 If you have received this message in error, please notify us immediately so
that we may correct 
 our internal records. Please then delete the original message. Thank you.

 
  

 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to