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/20 18:39:59 UTC

_StringFromFile always reads first line from file

I am trying to send an XML request to a server using the following Soap/XML-RPC Data:
 
<envelope><body><requestlist session-id="${FSessionID}"><transaction>
${_StringFromFile(c:\qa\automatedtests\benchmarks\foldertree\0012-modify-labor-items.xml,)}
${FTimeClockGroupID}
${_StringFromFile(c:\qa\automatedtests\benchmarks\foldertree\0012-modify-labor-items.xml,)}
${FLabTextCustPropID}
${_StringFromFile(c:\qa\automatedtests\benchmarks\foldertree\0012-modify-labor-items.xml,)}
...
...
...
${FLabEnumCustPropID}
${_StringFromFile(c:\qa\automatedtests\benchmarks\foldertree\0012-modify-labor-items.xml,)}
</transaction></requestlist></body></envelope>
 
The problem I am having is that each _StringFromFile reads the first line of the file.  What I want it to do is read a line from a file, insert a variable string, read the next line from the file...and continue as such.  Is there currently any way of doing this?

 


 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: _StringFromFile always reads first line from file

Posted by ms...@apache.org.
I think you'd be better off using the CVSRead function, which is very similar.  
Your example is analogous to setting multiple parameters in the same HTTP 
Sampler, for which the CSVRead function is a better choice - it allows you to 
read from a file that contains multiple values per line, and you can refer to 
each value in the line with a column number.  

The only drawback is that you are responsible for making the call to move the 
next line, but it's not a big deal as that call returns an empty strting, so you 
can pretty much put it anywhere without a problem.

-Mike

On 20 Jun 2003 at 10:39, Brian Lundell wrote:

> I am trying to send an XML request to a server using the following Soap/XML-RPC Data:
>  
> <envelope><body><requestlist session-id="${FSessionID}"><transaction>
> ${_StringFromFile(c:\qa\automatedtests\benchmarks\foldertree\0012-
modify-labor-items.xml,)}
> ${FTimeClockGroupID}
> ${_StringFromFile(c:\qa\automatedtests\benchmarks\foldertree\0012-
modify-labor-items.xml,)}
> ${FLabTextCustPropID}
> ${_StringFromFile(c:\qa\automatedtests\benchmarks\foldertree\0012-
modify-labor-items.xml,)}
> ...
> ...
> ...
> ${FLabEnumCustPropID}
> ${_StringFromFile(c:\qa\automatedtests\benchmarks\foldertree\0012-
modify-labor-items.xml,)}
> </transaction></requestlist></body></envelope>
>  
> The problem I am having is that each _StringFromFile reads the first line of 
the file.  What I want it to do is read a line from a file, insert a variable string, 
read the next line from the file...and continue as such.  Is there currently any 
way of doing this?
> 
>  
> 
> 
>  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.
> 
>  
>   
> 
>  
> 



--
Michael Stover
mstover1@apache.org
Yahoo IM: mstover_ya
ICQ: 152975688
AIM: mstover777

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