You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Brian Lundell <bl...@timeindustrial.com> on 2003/06/24 19:31:10 UTC

__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.

 
  

 

Re: __CSVRead always reads the same file.

Posted by peter lin <jm...@yahoo.com>.
 
hi brian,
 
are you using SOAP/XML-RPC sampler or the new webservice sampler. I'm guessing webservice sampler, since the older XML-RPC sampler doesn't take file.
 
patching it to take comma separated file should be fairly easy.  I did post/attach a patch to the webservice sampler in bugzilla that takes a directory containing multiple xml messages.
 
when I get home I'll send ya a link, since the patches aren't in the nightly yet. the directory path option results in random selection of XML messages.
 
 
 
peter lin


Brian Lundell <bl...@timeindustrial.com> wrote:
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())}

${__CSVRead(File1.xml,0)}${ParameterThatWorks}${__CSVRead(File1.xml,1)}


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 

-----------------------------------------------------------------------------------------
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.







---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!