You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jeevak Kasarkod <so...@gmail.com> on 2014/10/03 07:27:25 UTC

Documentation for custom plugins

Hi,
Can someone point me to or provide documentation for building a custom plugin for JMeter? Specifically the ability to provide data pre-processing before it can be used as input for the test cases. In my case I need the ability to encrypt the data before it can be used as a valid input payload for my test cases. 
I also need information such as project structure setup, build and deploy details.

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


Re: Documentation for custom plugins

Posted by Flavio Cysne <fl...@gmail.com>.
I think that, for what you said, write o whole new plugin for TCP
encryption may not be the best approach.

Have a look at the TCP Sampler component
http://jmeter.apache.org/usermanual/component_reference.html#TCP_Sampler

It says that "Users can provide their own implementation. The class must
extend org.apache.jmeter.protocol.tcp.sampler.TCPClient."

Checkout JMeter`s source code and take a look at TCPClientImpl,
BinaryTCPClientImpl, LengthPrefixedBinaryTCPClientImpl classes.
Writing your own TCP Encrypted client would be a better way to solve your
request and will take less code to put it on.

Before start digging JMeter`s source code, try to write a TCP with SSL/TLS
using a BeanShell sampler.

Some resources related to this:
http://stackoverflow.com/questions/6553074/secure-tcp-connections-in-java
http://bytes.com/topic/java/answers/848845-java-socket-programming-aes-encryption
http://pt.slideshare.net/sagarmali2012/securing-tcp-connections-using-ssl

Re: Documentation for custom plugins

Posted by Jeevak Kasarkod <so...@gmail.com>.
Flavio,
Thanks for the response. Im not a JMeter user so please expect some
incorrect terminology.
MD5 is a hashing function but I need a reversible encryption/decryption
algorithm so we are using RSA encryption.
My need is to perform encryption for data that is being streamed over TCP
or read from a file as input to the module that is being tested.
Since there is no GUI element associated with the plugin do I only
implement the TestBean interface and inherit from TestElement?


On Fri, Oct 3, 2014 at 3:41 AM, Flavio Cysne <fl...@gmail.com> wrote:

> If by encrypt you mean using MD5 algorithm, and by data you mean parameter
> values or body message, you could use Jmeter-Plugins' md5 function (
> http://jmeter-plugins.org/wiki/Functions/).
>
> The articles below, from JMeter official site, talks about writing your own
> plugin.
> https://jmeter.apache.org/extending/jmeter_tutorial.pdf
> http://wiki.apache.org/jmeter/BuildingPlugInWithEclipse
>
> Checkout JMeter and JMeter-Plugins source codes and have a look at them.
>

Re: Documentation for custom plugins

Posted by Flavio Cysne <fl...@gmail.com>.
If by encrypt you mean using MD5 algorithm, and by data you mean parameter
values or body message, you could use Jmeter-Plugins' md5 function (
http://jmeter-plugins.org/wiki/Functions/).

The articles below, from JMeter official site, talks about writing your own
plugin.
https://jmeter.apache.org/extending/jmeter_tutorial.pdf
http://wiki.apache.org/jmeter/BuildingPlugInWithEclipse

Checkout JMeter and JMeter-Plugins source codes and have a look at them.