You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Marcell Fulop <ma...@net-m.co.uk> on 2012/08/07 18:27:53 UTC

Functions

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi All,

First of all a big thank you! I'm a new user and JMeter is just awesome!

My question is about functions: If I understand right the available
functions one can use are listed in the documentation under section
19. Functions and Variables. What if I'd need to use some other basic
functions to be able to build my test? Is there a way to extend the
built-in ones with user defined functions? I don't actually mean user
defined, since the 2 I'm missing at the moment are pretty basic ones,
almost all programming languages implement them, namely sha1 and
base64encode/decode.

Thank you,
//m

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAlAhQggACgkQT4tnO14EuRnXIgD/eCOp7lAwnWwnDjLDmZvpNGHU
UWjmEGXH4FgOhoUJRDoA/0zusHI+fuhQZ4pNwK8irLTfeMxV00e14UwG6JHB3jaK
=r3LX
-----END PGP SIGNATURE-----

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


Re: Functions

Posted by Marcell Fulop <ma...@net-m.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Finally I ended up doing my calculations using Java in a BeanShell
Sampler. It's not very clear what it has to do with BeanShell itself
but at the moment I have way to much load-testing to set up and
analyse to care about this as long as the job is done as I need it.

Thanks again anyway!

//m

On 07/08/12 18:22, Deepak Shetty wrote:
> The beanshell performance refers to how many parallel threads you
> can run from the client
> 
> Beanshell is more flexible than writing custom functions (plus you
> can call beanshell code from the existing BeanShell function
> function
> 
> ${__BeanShell(123*456)} ) or
> ${__BeanShell(source("function.bsh"))}
> 
> 
> and you can prototype things rapidly(usually in a pre processor) -
> it is slower though and it is a pain to debug non trivial scripts.
> 
> regards deepak
> 
> On Tue, Aug 7, 2012 at 10:16 AM, Marcell Fulop
> <ma...@net-m.co.uk>wrote:
> 
> Thanks for pointing me to the right direction. I'll check and see
> what I can do and how expensive that is via BeanShell (well
> performance is not really an issue as it has a price on the runner
> machine not the server being tested). However, the other option
> outlined in this blog-post seems a lot more interesting and
> flexible.
> 
> Thanks //m
> 
> 
> On 07/08/12 17:36, Deepak Shetty wrote:
>>>> http://gabenell.blogspot.com/2010/01/custom-functions-for-jmeter.html
>>>>
>>>>
>
>>>> 
A lot can be done in beanshell/bsf pre/post processor if you dont mind some
>>>> overhead
>>>> 
>>>> regards deepak
>>>> 
>>>> On Tue, Aug 7, 2012 at 9:27 AM, Marcell Fulop 
>>>> <ma...@net-m.co.uk>wrote:
>>>> 
>>>> Hi All,
>>>> 
>>>> First of all a big thank you! I'm a new user and JMeter is
>>>> just awesome!
>>>> 
>>>> My question is about functions: If I understand right the 
>>>> available functions one can use are listed in the
>>>> documentation under section 19. Functions and Variables. What
>>>> if I'd need to use some other basic functions to be able to
>>>> build my test? Is there a way to extend the built-in ones
>>>> with user defined functions? I don't actually mean user
>>>> defined, since the 2 I'm missing at the moment are pretty
>>>> basic ones, almost all programming languages implement them,
>>>> namely sha1 and base64encode/decode.
>>>> 
>>>> Thank you, //m
>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>>
>>>>>
>
>>>>> 
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>>>>> For additional commands, e-mail:
>>>>> user-help@jmeter.apache.org
>>>>> 
>>>>> 
>>>> 
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAlAillAACgkQT4tnO14EuRkemQEAxirVbznElY0f/z4IEGKyu3PH
rLzbnTqtUc0U/CsNNb8A/11SNIp7NTmwsdsY7R9wEhkwD0rIY2G7JiKiR5tcU7xp
=BQ4m
-----END PGP SIGNATURE-----

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


Re: Functions

Posted by Deepak Shetty <sh...@gmail.com>.
The beanshell performance refers to how many parallel threads you can run
from the client

Beanshell is more flexible than writing custom functions (plus you can call
beanshell code from the existing BeanShell function function

${__BeanShell(123*456)} ) or ${__BeanShell(source("function.bsh"))}


and you can prototype things rapidly(usually in a pre processor) - it is
slower though and it is a pain to debug non trivial scripts.

regards
deepak

On Tue, Aug 7, 2012 at 10:16 AM, Marcell Fulop <ma...@net-m.co.uk>wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Thanks for pointing me to the right direction. I'll check and see what
> I can do and how expensive that is via BeanShell (well performance is
> not really an issue as it has a price on the runner machine not the
> server being tested). However, the other option outlined in this
> blog-post seems a lot more interesting and flexible.
>
> Thanks
> //m
>
>
> On 07/08/12 17:36, Deepak Shetty wrote:
> > http://gabenell.blogspot.com/2010/01/custom-functions-for-jmeter.html
> >
> >
> A lot can be done in beanshell/bsf pre/post processor if you dont mind some
> > overhead
> >
> > regards deepak
> >
> > On Tue, Aug 7, 2012 at 9:27 AM, Marcell Fulop
> > <ma...@net-m.co.uk>wrote:
> >
> > Hi All,
> >
> > First of all a big thank you! I'm a new user and JMeter is just
> > awesome!
> >
> > My question is about functions: If I understand right the
> > available functions one can use are listed in the documentation
> > under section 19. Functions and Variables. What if I'd need to use
> > some other basic functions to be able to build my test? Is there a
> > way to extend the built-in ones with user defined functions? I
> > don't actually mean user defined, since the 2 I'm missing at the
> > moment are pretty basic ones, almost all programming languages
> > implement them, namely sha1 and base64encode/decode.
> >
> > Thank you, //m
> >
> >>
> >> ---------------------------------------------------------------------
> >>
> >>
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> >> For additional commands, e-mail: user-help@jmeter.apache.org
> >>
> >>
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.17 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iF4EAREIAAYFAlAhTWAACgkQT4tnO14EuRkOiAD/eRNvhsWIxeN3o25N2iOHl3ST
> GruVDGGBtpMQ4Nh2oTQA/ialtgqTw7VxaG+U08D+GOkxJ+RmCAo/YOJ4IMnU2+MB
> =YLv2
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: Functions

Posted by Marcell Fulop <ma...@net-m.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Thanks for pointing me to the right direction. I'll check and see what
I can do and how expensive that is via BeanShell (well performance is
not really an issue as it has a price on the runner machine not the
server being tested). However, the other option outlined in this
blog-post seems a lot more interesting and flexible.

Thanks
//m


On 07/08/12 17:36, Deepak Shetty wrote:
> http://gabenell.blogspot.com/2010/01/custom-functions-for-jmeter.html
>
> 
A lot can be done in beanshell/bsf pre/post processor if you dont mind some
> overhead
> 
> regards deepak
> 
> On Tue, Aug 7, 2012 at 9:27 AM, Marcell Fulop
> <ma...@net-m.co.uk>wrote:
> 
> Hi All,
> 
> First of all a big thank you! I'm a new user and JMeter is just
> awesome!
> 
> My question is about functions: If I understand right the
> available functions one can use are listed in the documentation
> under section 19. Functions and Variables. What if I'd need to use
> some other basic functions to be able to build my test? Is there a
> way to extend the built-in ones with user defined functions? I
> don't actually mean user defined, since the 2 I'm missing at the
> moment are pretty basic ones, almost all programming languages
> implement them, namely sha1 and base64encode/decode.
> 
> Thank you, //m
> 
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAlAhTWAACgkQT4tnO14EuRkOiAD/eRNvhsWIxeN3o25N2iOHl3ST
GruVDGGBtpMQ4Nh2oTQA/ialtgqTw7VxaG+U08D+GOkxJ+RmCAo/YOJ4IMnU2+MB
=YLv2
-----END PGP SIGNATURE-----

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


Re: Functions

Posted by Deepak Shetty <sh...@gmail.com>.
http://gabenell.blogspot.com/2010/01/custom-functions-for-jmeter.html
A lot can be done in beanshell/bsf pre/post processor if you dont mind some
overhead

regards
deepak

On Tue, Aug 7, 2012 at 9:27 AM, Marcell Fulop <ma...@net-m.co.uk>wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Hi All,
>
> First of all a big thank you! I'm a new user and JMeter is just awesome!
>
> My question is about functions: If I understand right the available
> functions one can use are listed in the documentation under section
> 19. Functions and Variables. What if I'd need to use some other basic
> functions to be able to build my test? Is there a way to extend the
> built-in ones with user defined functions? I don't actually mean user
> defined, since the 2 I'm missing at the moment are pretty basic ones,
> almost all programming languages implement them, namely sha1 and
> base64encode/decode.
>
> Thank you,
> //m
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.17 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iF4EAREIAAYFAlAhQggACgkQT4tnO14EuRnXIgD/eCOp7lAwnWwnDjLDmZvpNGHU
> UWjmEGXH4FgOhoUJRDoA/0zusHI+fuhQZ4pNwK8irLTfeMxV00e14UwG6JHB3jaK
> =r3LX
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>