You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Scott Eade <se...@backstagetech.com.au> on 2002/07/09 09:09:38 UTC
HTTP Parameter Mask
Hi,
Looking at HTTP Parameter Mask, it seems that a minor change, the inclusion
of a suffix in addition to the prefix, would make this modifier more useful.
This would allow me to specify a username thus:
user123@myco.com
With a prefix of "user" and a suffix of "@myco.com".
In order to do this currently I need to use a HTTP User Parameter modifier,
coding each of the userids into an XML file. This seems like overkill if my
users have a regular naming structure - a HTTP Parameter Mask that provided
a suffix would be a much better solution.
I can probably work on a patch if this is seen as useful, but being new to
JMeter I don't yet feel confident that I will identify all of the necessary
changes.
Cheers,
Scott
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: HTTP Parameter Mask
Posted by Joseph Barefoot <jo...@hereuare.com>.
> Joe - thanks for the code. As you may have seen I went the way of HTML
> Parameter Mask. Mike has committed my patches to support suffix
> values and
> the functionality is included in 1.7.2. This means that there is now
> built-in jmeter functionality to produce these types of user_id
> and password
> values.
Sweet, that would have saved me some work a few months ago!
>
> I still need to generate the SQL to create all of the necessary
> users in my
> application. This prompted me to look at the code you provided.
> There was
> nothing wrong with your code, but I was thinking the same thing could be
> achieved reasonably easily with XSL. The result is included in
> the attached
> files - just change the values in user-structure.xml, then have your
> favourite xslt processor (tested with msxml3, but should work fine with
> xalan) transform this using users.xsl.
Yes, if you are only generating parameters named user_id and password. If
you want to change these or add more parametes, you wouldn't be able to do
it with this XSL stylesheet without changing both it and the
user-structure.xml template file.
I had considered XSL here as well, but I created the generator because I
needed to add any number of parameters to different templates without having
to change anything else, and not being an XSL expert: A) I'm not sure if
you can do that or not with a single stylesheet and B) even if you can, it
would have taken me a lot longer to figure it out than the simple
replacement strategy the generator uses. :)
b.t.w., I needed to add lots of different parameters because I was testing
user registration (and using JMeter as a means of automating the
registration of hundreds of test users), amongst other things, and I wanted
to have different values for all the contact info., billing info., etc.
Using our pre-existing registration process over HTTP w/ JMeter this way to
load users proved faster than producing the SQL that would have been
necessary to accomplish the same thing, in this particular case.
I like the usage of XSL though, I've been trying to come up with ways to put
it to good use for data reporting mechanisms....thanks for sharing.
peace,
Joe
>I only really produced
> the format of
> users.xml for fun - for my intended purpose I will change the
> style sheet so
> that it produces SQL specific my application rather than XML. I
> thought I'd
> send these to the list so that others can adapt them to their own
> purposes.
>
> Cheers,
>
> Scott
> --
> Scott Eade
> Backstage Technologies Pty. Ltd.
> Web: http://www.backstagetech.com.au
>
>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: HTTP Parameter Mask
Posted by Scott Eade <se...@backstagetech.com.au>.
> From: "Joseph Barefoot" <jo...@hereuare.com>
>
>>> I can send you the generator source and compiled classes, plus a test
>>> template file if you like.
>>
>> Yes, please send me the code off-list. This may be helpful if I end up
>> going down this route. Perhaps it may be helpful to others - is there
>> somewhere on the JMeter site it could go?
>
> Dunno, but if others find it useful, I'm certainly fine with putting the
> source code up somewhere for people to use or adapt to their own needs.
>
> peace,
> Joe
>
> P.S. I sent the code to you offline, b.t.w.
Joe - thanks for the code. As you may have seen I went the way of HTML
Parameter Mask. Mike has committed my patches to support suffix values and
the functionality is included in 1.7.2. This means that there is now
built-in jmeter functionality to produce these types of user_id and password
values.
I still need to generate the SQL to create all of the necessary users in my
application. This prompted me to look at the code you provided. There was
nothing wrong with your code, but I was thinking the same thing could be
achieved reasonably easily with XSL. The result is included in the attached
files - just change the values in user-structure.xml, then have your
favourite xslt processor (tested with msxml3, but should work fine with
xalan) transform this using users.xsl. I only really produced the format of
users.xml for fun - for my intended purpose I will change the style sheet so
that it produces SQL specific my application rather than XML. I thought I'd
send these to the list so that others can adapt them to their own purposes.
Cheers,
Scott
--
Scott Eade
Backstage Technologies Pty. Ltd.
Web: http://www.backstagetech.com.au
RE: HTTP Parameter Mask
Posted by Joseph Barefoot <jo...@hereuare.com>.
> > I can send you the generator source and compiled classes, plus a test
> > template file if you like.
>
> Yes, please send me the code off-list. This may be helpful if I end up
> going down this route. Perhaps it may be helpful to others - is there
> somewhere on the JMeter site it could go?
Dunno, but if others find it useful, I'm certainly fine with putting the
source code up somewhere for people to use or adapt to their own needs.
peace,
Joe
P.S. I sent the code to you offline, b.t.w.
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: HTTP Parameter Mask
Posted by Scott Eade <se...@backstagetech.com.au>.
> From: "Joseph Barefoot" <jo...@hereuare.com>
>
> Hi Scott,
>
> This addition to HTTP Parameter Mask does seem useful, and I had need of the
> same functionality, but solved the problem a different way: I wrote an XML
> generator to generate the HTTP User Parameter Modifier XML files from a
> template file. The template file uses placeholders to enable indices to be
> inserted anywhere in a parameter value (e.g. loadTest0@domain.com,
> loadTest1@domain.com).
I was thinking of doing something similar - using XSLT to generate the
user.xml file.
>
> I can send you the generator source and compiled classes, plus a test
> template file if you like.
Yes, please send me the code off-list. This may be helpful if I end up
going down this route. Perhaps it may be helpful to others - is there
somewhere on the JMeter site it could go?
>
> peace,
> Joe
One of my concerns is that I need something like 15,000 users. I figure the
overhead of dealing with such a large XML file will be significantly greater
than using a HTTP Parameter Mask that supported a suffix.
As per Michael Stover's suggestion, I think I'll have a crack at enhancing
HTTP Parameter Mask first, and fall back to HTTP User Parameter Modifier if
I don't get anywhere.
Thanks Joseph and Michael for your replies. You'll no how I went if you see
a patch on the dev list ;-)
Scott
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: HTTP Parameter Mask
Posted by Joseph Barefoot <jo...@hereuare.com>.
Hi Scott,
This addition to HTTP Parameter Mask does seem useful, and I had need of the
same functionality, but solved the problem a different way: I wrote an XML
generator to generate the HTTP User Parameter Modifier XML files from a
template file. The template file uses placeholders to enable indices to be
inserted anywhere in a parameter value (e.g. loadTest0@domain.com,
loadTest1@domain.com).
I can send you the generator source and compiled classes, plus a test
template file if you like.
peace,
Joe
> -----Original Message-----
> From: Scott Eade [mailto:seade@backstagetech.com.au]
> Sent: Tuesday, July 09, 2002 12:10 AM
> To: JMeter Users List
> Subject: HTTP Parameter Mask
>
>
> Hi,
>
> Looking at HTTP Parameter Mask, it seems that a minor change, the
> inclusion
> of a suffix in addition to the prefix, would make this modifier
> more useful.
> This would allow me to specify a username thus:
>
> user123@myco.com
>
> With a prefix of "user" and a suffix of "@myco.com".
>
> In order to do this currently I need to use a HTTP User Parameter
> modifier,
> coding each of the userids into an XML file. This seems like
> overkill if my
> users have a regular naming structure - a HTTP Parameter Mask
> that provided
> a suffix would be a much better solution.
>
> I can probably work on a patch if this is seen as useful, but being new to
> JMeter I don't yet feel confident that I will identify all of the
> necessary
> changes.
>
> Cheers,
>
> Scott
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>