[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jmeter-user
Subject:    Re: Extending JMeter
From:       sebb <sebbaz () gmail ! com>
Date:       2006-03-28 23:56:20
Message-ID: 25aac9fc0603281556w46854f14ka584e1c488704042 () mail ! gmail ! com
[Download RAW message or body]

On 28/03/06, Travis Cooper <tcooper@overstock.com> wrote:
> Everything started because I need something similar to the foreach
> controller that will loop through multiple variables.  So I have a
> script that searches our company website and gets 10 random products.
> In order to add these products to the shopping cart I need 3 different
> variables for each product.  I would like to just use something like a
> foreach controller that will loop through these 3 variables.  I can't
> seem to find anything that does this so I have resorted to making 10
> different http requests.  I would like to create a controller that does
> this, and I am sure I will think of some other things I want to create
> as well.  So I am just trying to write a very simple controller to get a
> feel for what I really need to do.  So I would love to see a simple

It should not be too difficult to extend the ForEach Controller to set
multiple variables.

The GUI coding is rather tedious, so I suggest allowing a list of
input/output variable names, separated by spaces.

The rest should just be a question of adding the extra output variable
definitions.

> tutorial that would go through what classes are best to extend/implement
> and what the necessary methods are and what they do in general.
> Obviously this doesn't exist so I will just figure things out on my own.

AFAIK, the only documentation on the Controllers is the Javadoc and the code.
Contributions welcome ...

But there is a document on creating Visualisers and TestBeans - see
the Tutorial section on the web-site. If there are any omissions or
inaccuracies, please let us know, ideally via Bugzilla.

> Thanks,
> Travis J. Cooper
>
> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: Tuesday, March 28, 2006 3:37 PM
> To: JMeter Users List
> Subject: Re: Extending JMeter
>
> On 28/03/06, Travis Cooper <tcooper@overstock.com> wrote:
> > I just think that it would be easier if instead of having to modify
> > files I could make a call to JMeterUtils and register a new string
> > with an associated name.  This way other people that try to use my
> > scripts
>
> Not sure what you mean by strings with names here.
> How are they referenced?
>
> > won't have to go and update a bunch of files, they can just include
> > the jar file with my new controllers and everything would run
> > smoothly.  I
>
> I'm not sure what "bunch of files" you are referring to - except perhaps
> messages*.properties.
>
> If you use the TestBean approach, then all resource strings are in files
> that are local to the classes, and can be provided in a jar by you -
> there is no need to update the central messages.properties file(s).
>
> > realize this might not be a simple change, but just something I
> > thought would be helpful.  I will take a look at those samples and see
>
> > what I can get out of them.  The biggest issue I am having is that the
>
> > html files that talk about extending talk about implementing/extending
>
> > some classes that I can't seem to find.  I assume this is because
> > things have progressed and changed since those documents were created.
>
> > Anyway, I
>
> Which classes can't you find?
>
> > will look at those things you have all suggested, if anybody has any
> > other suggestions of where to look for some examples let me know.
>
> I still don't know what you are trying to achieve, so it's difficult to
> provide the information you may need.
>
> > Thanks,
> > Travis J. Cooper
> >
> > -----Original Message-----
> > From: Simon [mailto:sdeuvarow@gmail.com]
> > Sent: Tuesday, March 28, 2006 7:52 AM
> > To: JMeter Users List
> > Subject: Re: Extending JMeter
> >
> > ok, thank you for the explanation.
> >
> > 2006/3/28, sebb <sebbaz@gmail.com>:
> > >
> > > On 28/03/06, Simon <sdeuvarow@gmail.com> wrote:
> > > > hi, the getLabelResource returns a key that is used for getting a
> > > > string from a file. this string is the string that you see in the
> > GUI.
> > >
> > > This is deliberate, so that JMeter can display a local language
> > > string
> >
> > > if required.
> > >
> > > But I don't see how this relates to missing functionality in JMeter
> > ...
> > >
> > > > when you write another component you have to modify these files
> > > > (one
> >
> > > > per
> > > > language) adding the new key.
> > >
> > > No, you only need to add the key to the default messages.properties.
> > > Translations are optional.
> > >
> > > You can also override getStaticLabel() if you don't want to allow
> > > the title to be translated. But why do that?
> > >
> > > > the files are in the binary:
> > > >
> > > > %JMeterHome%\lib\ext\ApacheJMeter_core.jar\org\apache\jmeter\resou
> > > > rc
> > > > es\
> > > >
> > > > or in the source:
> > > >
> > > > %JMeterHome%\src\core\org\apache\jmeter\resources\
> > > >
> > >
> > > Yes.
> > >
> > > >
> > > > 2006/3/27, sebb <sebbaz@gmail.com>:
> > > > >
> > > > > What is it that is missing from the current elements?
> > >
> > > I still don't understand what it is that JMeter is lacking ...
> > >
> > > > >
> > > > > JMeter variables are thread-specific variables; just put/get
> > > > > them as needed.
> > > > >
> > > > > There are some example samplers in the 2.1 branch that I have
> > > > > just
> >
> > > > > updated; there aren't any sample config elements, but you could
> > > > > just amend an existing one. [I might get around to creating
> > > > > one.]
> > > > >
> > > > > Control elements are by far the most complicated part of JMeter;
>
> > > > > I'm not sure I understand them ...
> > > > >
> > > > > S.
> > > > > On 27/03/06, Travis Cooper <tcooper@overstock.com> wrote:
> > > > > > I am trying to make some new config and control elements to do
>
> > > > > > some things that I can't do with what exists right now in
> > > > > > JMeter.  I have been noticing that the set of controllers that
>
> > > > > > exist all use
> > > JMeterUtils
> > > > > > to handle aliased names.  How can I register my variables with
>
> > > > > > JMeterUtils so I can use that functionality?  Especially
> > > > > > because
> >
> > > > > > the getLabelResource expects a string that maps into the
> > JMeterUtils'
> > > > > > structure.  Also, if anybody knows of a tutorial somewhere
> > > > > > that is
> > > more
> > > > > > up to date with extending that would be very helpful.  If I
> > > > > > could
> > > just
> > > > > > see how to get one working I would be able to do things a lot
> > > faster.
> > > > > > So if anybody knows where one is, or could make one, with step
>
> > > > > > by
> > > step
> > > > > > instructions for what classes to extend and implement and what
>
> > > > > > the methods needed are and what they do that would be great.
> > > > > >
> > > > > > Thanks,
> > > > > > Travis J. Cooper
> > > > > >
> > > > > >
> > > > >
> > > > > ----------------------------------------------------------------
> > > > > --
> > > > > --- 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
>
>
> ---------------------------------------------------------------------
> 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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic