You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by "Stover, Michael" <Mi...@usa.xerox.com> on 2001/07/24 16:49:13 UTC

RE: Any ideas how to make the GUI enforce ConfigElement uniquenes s?

I will be extremely interested in your progress because I am scheduled to
essentially do the same thing for my job in the next month.  I'd like very
much to talk about your strategy and requirements - maybe we could help each
other.

To answer your question, I think some work could be done that would allow
JMeter to disallow a duplicate item being added to a given tree item (is
that what you meant?).  For instance, it might make sense to disallow
multiple timers being added to a threadgroup.  I think the easiest way to do
this would be to modify JMeterTreeModel.java, and override the
"insertNodeInto()" method to check if 1)the object being inserted requires
uniqueness (new method for the JMeterComponent interface?) and if so,
2)whether the tree already contains such a node at the current level.

To go beyond your question, could you describe your plan more to me?  My
plan involved parsing responses for links and forms, matching them with
configured URLConfig elements that contain regular expressions for the URL
path, arguments, and parameters, and then finding a matching link on the
page and generating a new URLConfig object based on all the information.  An
example might help:

We have an application that allows users to select documents from their
repository.  Thus, we often present them with a page listing their
documents, with a checkbox by each one.  The name and value of the
checkboxes are something like name="document" value="1".  There may be 20 on
a page, but we want to simulate the user choosing one.  We don't care which
one.  So, I'd create a URLConfig that contained an argument-value pair that
looked like:
name="document", value="\d+" (where "\d" is Perl regex for "digit", I
think).  Add a parsing controller to the tree that parses responses, and it
will look for a form request that contains a input of that type.  Upon
finding the right form action, it will essentially pick one at random (if we
wanted to do 2 docs, we'd have entered the above twice into the URLConfig
parameter table).  We need this because the actual numbers in the Value
field are not predictable.

I built some methods in JMeter's interfaces last winter to enable this type
of activity.  The SamplerController interface, for example, has a method
"getListeners()".  What this does is allow a Controller to add itself as a
listener to a ThreadGroup.  Thus, the Controller will get all the responses,
giving it a chance to react to it.  I realize that currently this would get
messed up if the user selected more than 1 thread in the threadgroup, but
that can be fixed later.

-Mike

> -----Original Message-----
> From: Jamie Davidson [mailto:Jamie.Davidson@bridgewatersystems.com]
> Sent: Tuesday, July 24, 2001 10:04 AM
> To: jmeter-dev@jakarta.apache.org
> Subject: Any ideas how to make the GUI enforce ConfigElement 
> uniqueness?
> 
> 
> I am adding an in-house extension which allows the inclusion 
> of Generator modules (where Generators will dynamically 
> generate data for use within the UrlConfig class, for example).  
> Each Generator has a single SeedGenerator associated with it 
> (SeedGenerator being an interface).
> 
> Any idea how I can extend the JMeter GUI model so that I can 
> enforce SeedGenerator uniqueness for any given Generator?
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> 

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