I re-made test1.txt file and now it works.
Very strange.
-Chris
ChristopherPesarchick@westf
ieldgrp.com To: "JMeter Users List" <jmeter-user@jakarta.apache.org>
cc:
10/13/2003 01:35 PM Subject: RE: String replacement
Please respond to "JMeter
Users List"
Well I took your idea and I found something that doesn't make sense.
I read in two files.
${_StringFromFile(${path}/test1.txt,begin)}
${_StringFromFile(${path}/test2.txt,end)}
I have 1 thread and 10 loops.
Every other iteration the begin variable is empty.
Every iteration the end variable is correct.
What is going on?
Thanks,
Chris
ChristopherPesarchick@westf
ieldgrp.com To: "JMeter
Users List" <jmeter-user@jakarta.apache.org>
cc:
10/13/2003 12:54 PM Subject: RE:
String replacement
Please respond to "JMeter
Users List"
I was afraid I would have to do that.
I wrote that last email before I read this one.
Thanks,
Chris
mstover1@apache.o
rg To: JMeter Users List
<jmeter-user@jakarta.apache.org>
cc:
10/13/2003 12:52 Subject: RE: String
replacement
PM
Please respond to
"JMeter Users
List"
Yes, exactly. I understood what you wanted. But your example lends itself
to an obvious
solution:
"see ${__StringFromFile(names.txt)} run"
right? But, if the "see" and 'run" part also vary, you might have to do
something like:
"${__StringFromFile(begin.txt)} ${__StringFromFile(names.txt)}
${__StringFromFile(end.txt)}"
Which, of course, is ugly, but there you go. If you need something more
complex, then like I
said, JMeter probably can't do it.
-Mike
On 13 Oct 2003 at 12:36, ChristopherPesarchick@westfieldgrp.com wrote:
>
>
>
>
> I don't think I made myself clear.
>
> StringFromFile reads in a file. Lets say that it says "See jane run.".
> Once I read that in, I want to change "jane" to some other word for each
> loop and thread.
>
> Very simplistic example, but that is the functionality I need.
> I hope that makes more sense.
>
> Thanks,
> Chris
>
>
>
>
>
> mstover1@apache.o
> rg To: JMeter Users
List <jmeter-
user@jakarta.apache.org>
> cc:
> 10/13/2003 12:24 Subject: RE: String
replacement
> PM
> Please respond to
> "JMeter Users
> List"
>
>
>
>
>
>
> I get the impression what he'd like is for the value from StringFromFile
to
> be
> interpreted as a possible JMeter function, but that doesn't happen right
> now -
> the function returns it's string without looking at it.
>
> It seems a little odd that you'd need to have a list of values each with
> _different_ functions within them. If the same function would serve,
then
> you
> could probably do something like:
>
> ${__specialFunction()}${__StringFromFile(partial_values.txt)}
>
> Where, instead of putting the special function in the data file, put it
in
> the
> JMeter component and just put the remaining static part of your value int
> the
> data file.
>
> If you really intend to use different functions for each value, then I
> don't see a
> way of doing that, right now. I suppose JMeter could be modified to
always
> check functions' return values as possible functions themselves, but that
> would
> incur a potentially severe performance hit. Right now all functions are
> "compiled" before the test starts, which helps performance greatly.
>
> -Mike
>
> On 13 Oct 2003 at 17:02, BAZLEY, Sebastian wrote:
>
> > Try the regex or javascript functions.
> >
> > Or perhaps you could edit the input file? - you can have multiple calls
> to
> > SFF in the test plan, and each has its own reader, so if you want
several
> > pieces of information at once, you could instead read from several
> different
> > files.
> >
> > S.
> > -----Original Message-----
> > From: ChristopherPesarchick@westfieldgrp.com
> > [mailto:ChristopherPesarchick@westfieldgrp.com]
> > Sent: 13 October 2003 16:56
> > To: JMeter Users List
> > Subject: String replacement
> >
> >
> >
> >
> >
> >
> > I load in a string using StringFromFile function.
> > Once I get the string, how can I replace a portion of the string with
> some
> > other value?
> > Similar functionality as a replaceFirst in the java String object.
> >
> > Thanks,
> > Chris
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
>
>
>
>
> --
> 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
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
--
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
---------------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
|