You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Andrej van der Zee <an...@gmail.com> on 2011/04/27 07:43:18 UTC

feedback: experience with JMeter

Hi,

I would like to share my experience with JMeter.

IMHO, modifying POST-bodies before sending to the server with
BeanShell or other external interpreters is harder than it could be. I
would expect a post-controller with regular expression with
substitutions local to the running thread. This would make the
learning step lower for non-Java people like me, much more
user-friendly and less error-prone (thread-synchronization should be
hidden by JMeter instead of explicitly handled in an external script).

Hopefully somebody will pick this up in the future!

Cheers,
Andrej

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


Re: feedback: experience with JMeter

Posted by Deepak Shetty <sh...@gmail.com>.
>If you have an XML template file
So then you are dealing with files arent you(not just POST data) - which in
general are binary(The two notable exceptions these days would be XML and
JSON formats). So when you want to run a pre processor you'd have to say
which file (since there could be multiple) that you want to run against -
You'd have to decide whether you specify multiple - find replace values or
whether you want Jmeter to consistently look for ${variableName} patterns
and replace all matches. You'd have to deal with what the file is encoded in
while reading so you'd have to specify this as well.

And finally since Jmeter is a load generator you'd have to deal with the
cost of doing disk i/o for multiple threads on a client machine. in most
cases you could probably write an optimised script with something that works
only for you rather than a regex - xpath find and replace (for e.g. say your
session id was appearing in two places , isnt it faster to have three in
memory sections  and just write that to disk interspersed with the session
id you want replaced rather than run a regex)

Again im not a jmeter dev so perhaps you will get this feature :).


On Wed, Apr 27, 2011 at 2:23 PM, Andrej van der Zee <
andrejvanderzee@gmail.com> wrote:

> Hi,
>
>
> > If the post data is specified as parameter / value this directly works ,
>  so
> > isn't your post in context of using files in the HTTP sampler?
>
>
> I guess you mean, for example, a url-encoded content-type such as
> application/x-www-form-urlencoded? If you have an XML template file
> with values that need to be substituted before each HTTP request, this
> approach already fails. It is not general enough. Regex and xpath
> should be supported too, in my opinion.
>
>
> >
> >>Moreover, there exists a post-controller with regular expressions and
> > *nothing* withholds the user to use it for binary POST-data.
> > The regex post processor usually assumes a text response-try running it
> when
> > the sampler returns a PDF for e.g.
>
>
> Yes, and a regex pre-processor could assume exactly the same thing.
> The user can choose for himself if he want to use it on a PDF file
> (doesn't make much sense indeed, but that is not for us to decide).
> Then people can use it on XML data (because JMeter also lacks an xpath
> pre-processor) or other textual POST-data. And, indeed, I can use it
> for my binary data.
>
>
> > Nope. I just wanted to indicate its not as straightforward as you think
> it
> > is to have a general solution
>
>
> I haven't heard any argument why it is not that straightforward to
> have a general solution. What is the problem then? It would be analog
> to the post-processor with regex.
>
>
> > (which is what i guess a Jmeter dev would look
> > for). In any case enhancement requests go into the jmeter bugzilla.
>
>
> I will do that.
>
> Cheers,
> Andrej
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: feedback: experience with JMeter

Posted by Andrej van der Zee <an...@gmail.com>.
Hi,


> If the post data is specified as parameter / value this directly works ,  so
> isn't your post in context of using files in the HTTP sampler?


I guess you mean, for example, a url-encoded content-type such as
application/x-www-form-urlencoded? If you have an XML template file
with values that need to be substituted before each HTTP request, this
approach already fails. It is not general enough. Regex and xpath
should be supported too, in my opinion.


>
>>Moreover, there exists a post-controller with regular expressions and
> *nothing* withholds the user to use it for binary POST-data.
> The regex post processor usually assumes a text response-try running it when
> the sampler returns a PDF for e.g.


Yes, and a regex pre-processor could assume exactly the same thing.
The user can choose for himself if he want to use it on a PDF file
(doesn't make much sense indeed, but that is not for us to decide).
Then people can use it on XML data (because JMeter also lacks an xpath
pre-processor) or other textual POST-data. And, indeed, I can use it
for my binary data.


> Nope. I just wanted to indicate its not as straightforward as you think it
> is to have a general solution


I haven't heard any argument why it is not that straightforward to
have a general solution. What is the problem then? It would be analog
to the post-processor with regex.


> (which is what i guess a Jmeter dev would look
> for). In any case enhancement requests go into the jmeter bugzilla.


I will do that.

Cheers,
Andrej

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


Re: feedback: experience with JMeter

Posted by Deepak Shetty <sh...@gmail.com>.
If the post data is specified as parameter / value this directly works ,  so
isn't your post in context of using files in the HTTP sampler?

>Moreover, there exists a post-controller with regular expressions and
*nothing* withholds the user to use it for binary POST-data.
The regex post processor usually assumes a text response-try running it when
the sampler returns a PDF for e.g.

>If you are a JMeter developer,
Nope. I just wanted to indicate its not as straightforward as you think it
is to have a general solution (which is what i guess a Jmeter dev would look
for). In any case enhancement requests go into the jmeter bugzilla.

regards
deepak

On Tue, Apr 26, 2011 at 11:53 PM, Andrej van der Zee <
andrejvanderzee@gmail.com> wrote:

> Hi,
>
> > merely that you cannot have JMeter perform find/replaces for binary
> formats.
> > You would have to have some sort of a plugin for each binary format(with
> the
> > associated cost for every subsequent version of that format).
>
> That was not the topic of my email. Why do you keep talking about
> binary data? I am talking about a *general* pre-controller for POST
> data, please read carefully.
>
> If you are a JMeter developer, my intentions are not to scrutinize the
> software, but rather to help making it better (the goal of open-source
> software).
>
> Moreover, there exists a post-controller with regular expressions and
> *nothing* withholds the user to use it for binary POST-data. So how is
> this different?
>
> Best regards,
> Andrej
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: feedback: experience with JMeter

Posted by Andrej van der Zee <an...@gmail.com>.
I opened an issue in BugZilla:
https://issues.apache.org/bugzilla/show_bug.cgi?id=51128
Cheers,
Andrej

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


Re: feedback: experience with JMeter

Posted by Andrej van der Zee <an...@gmail.com>.
Hi,

> I don't think you can do this with a preprocessor, but I wonder how hard it
> would be to introduce the concept of filterable streams into jmeter. Someone
> would have to write some filters, and they'd need to be able to present GUI
> controls in order to be configured. Sampler writers who do file I/O would
> have to indicate that they support the functionality and build a chain of
> filters.

Yes that sounds good to me, as long as we can configure "interesting"
filters in the GUI. I can imagine that, once the framework is in
place, adding new filters will become easy.

>
> Also, I wonder how many people would actually use it.

Indeed. I did find some people that faced similar issues with XPath
template files.

> Might be a fun project to poke at over a weekend...

Have fun!

Cheers,
Andrej

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


Re: feedback: experience with JMeter

Posted by Bruce Ide <fl...@gmail.com>.
Indeed.

I don't think you can do this with a preprocessor, but I wonder how hard it
would be to introduce the concept of filterable streams into jmeter. Someone
would have to write some filters, and they'd need to be able to present GUI
controls in order to be configured. Sampler writers who do file I/O would
have to indicate that they support the functionality and build a chain of
filters. Once implemented, it shouldn't be any harder to support than
regular java file I/O.

Also, I wonder how many people would actually use it.

Might be a fun project to poke at over a weekend...

-- 
Bruce Ide
FlyingRhenquest@gmail.com

Re: feedback: experience with JMeter

Posted by Andrej van der Zee <an...@gmail.com>.
Hi,

> I don't think this would work with the current design of jmeter. The
> pre-processors execute via a method call of process() prior to the execution
> of the sampler. It does not actually reside in the sampler or have any way
> to modify its internals. It's easy enough to add parameters because the
> sampler design allows for that, but installing an actual filter on the data
> stream would not be possible that way.

When developing software, sometimes we have to take a step back to be
able to move forward.

I cannot judge on the internals of JMeter, but from a user's
perspective, I think it should be done. But this is not for me to
decide of course.

Thanks for your reply!

Cheers,
Andrej

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


Re: feedback: experience with JMeter

Posted by Bruce Ide <fl...@gmail.com>.
I don't think this would work with the current design of jmeter. The
pre-processors execute via a method call of process() prior to the execution
of the sampler. It does not actually reside in the sampler or have any way
to modify its internals. It's easy enough to add parameters because the
sampler design allows for that, but installing an actual filter on the data
stream would not be possible that way.

One could possibly modify the httpclient class itself, to allow a user to
specify a different input stream class to use. I'm not sure if it would be
possible to do this in a particularly generic way. Since you also want to
add parameters (regular expressions and substitutions) to the filter, it
would also require some additional controls and a way to configure the
individual filters inside the application. It would take a bit more
designing than I'm able to do on the back of my napkin at the moment.

-- 
Bruce Ide
FlyingRhenquest@gmail.com

Re: feedback: experience with JMeter

Posted by Andrej van der Zee <an...@gmail.com>.
Hi,

> merely that you cannot have JMeter perform find/replaces for binary formats.
> You would have to have some sort of a plugin for each binary format(with the
> associated cost for every subsequent version of that format).

That was not the topic of my email. Why do you keep talking about
binary data? I am talking about a *general* pre-controller for POST
data, please read carefully.

If you are a JMeter developer, my intentions are not to scrutinize the
software, but rather to help making it better (the goal of open-source
software).

Moreover, there exists a post-controller with regular expressions and
*nothing* withholds the user to use it for binary POST-data. So how is
this different?

Best regards,
Andrej

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


Re: feedback: experience with JMeter

Posted by Deepak Shetty <sh...@gmail.com>.
merely that you cannot have JMeter perform find/replaces for binary formats.
You would have to have some sort of a plugin for each binary format(with the
associated cost for every subsequent version of that format).


On Tue, Apr 26, 2011 at 11:04 PM, Andrej van der Zee <
andrejvanderzee@gmail.com> wrote:

> Hi,
>
> > In general trying to run regex's against a binary file is not reliable.
>
> I am not sure the point you are trying to make.
>
> It doesn't have to be a binary file for this "missing" pre-controller
> with regex. I have seen examples of people doing the same trickery
> with external scripts for XML POST data. In my case it was binary data
> and in my case it is definitely reliable, which should be the
> JMeter-user's responsibility anyway.
>
> Cheers,
> Andrej
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: feedback: experience with JMeter

Posted by Andrej van der Zee <an...@gmail.com>.
Hi,

> In general trying to run regex's against a binary file is not reliable.

I am not sure the point you are trying to make.

It doesn't have to be a binary file for this "missing" pre-controller
with regex. I have seen examples of people doing the same trickery
with external scripts for XML POST data. In my case it was binary data
and in my case it is definitely reliable, which should be the
JMeter-user's responsibility anyway.

Cheers,
Andrej

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


Re: feedback: experience with JMeter

Posted by Deepak Shetty <sh...@gmail.com>.
> I would expect a post-controller with regular expression
In general trying to run regex's against a binary file is not reliable.

On Tue, Apr 26, 2011 at 10:43 PM, Andrej van der Zee <
andrejvanderzee@gmail.com> wrote:

> Hi,
>
> I would like to share my experience with JMeter.
>
> IMHO, modifying POST-bodies before sending to the server with
> BeanShell or other external interpreters is harder than it could be. I
> would expect a post-controller with regular expression with
> substitutions local to the running thread. This would make the
> learning step lower for non-Java people like me, much more
> user-friendly and less error-prone (thread-synchronization should be
> hidden by JMeter instead of explicitly handled in an external script).
>
> Hopefully somebody will pick this up in the future!
>
> Cheers,
> Andrej
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>