Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy : Add a Sampler Creator to allow plugging HTTP based samplers using potentially non textual POST Body (AMF, Silverlight...) and customizing them for others #2735

Closed
asfimport opened this issue Feb 15, 2012 · 4 comments

Comments

@asfimport
Copy link
Collaborator

@pmouawad (Bug 52674):
It would be useful to have the ability to plug a Sampler Customizer that depending on content type.

One example I need currently is the following:

  • For GWT samplers for example it would be useful to be able to directly set element.setProperty(HTTPSamplerBase.POST_BODY_RAW, useRaw, HTTPSamplerBase.POST_BODY_RAW_DEFAULT);

Another requirement I have is to be able to customize created sampler,
A direct use I see is for example a SilverLight or Flex protocol, doing this will enable plugins to implement a factory and use current implementations of Proxy, ProxyControl and HttpRequestHdr.

This could be done by delaying sampler creation until rawPostBody and contentType are available in HttpRequestHdr, once these are available , a factory could be called with content type , this would enable plugging other Samplers than just HttpSampler.

OS: All

Duplicates:

Depends on:

Blocks:

@asfimport
Copy link
Collaborator Author

@pmouawad (migrated from Bugzilla):
Created attachment BUG_52645.patch: Patch proposal

@asfimport
Copy link
Collaborator Author

@pmouawad (migrated from Bugzilla):
Hello,
I made some thorough testing of the code.
I also implemented an Binary (POST body) based protocol successfully by implementing a SamplerCreator subclass.
I think this feature will be very useful to allow recording protocols as AMF , Silverlight by plugins.

Can I commit it or you want to review it first ?
Thanks

Regards
Philippe

Created attachment BUG_52674.patch: Patch with Test updated

@asfimport
Copy link
Collaborator Author

@pmouawad (migrated from Bugzilla):
Date: Fri Mar 2 23:37:26 2012
New Revision: 1296512

URL: http://svn.apache.org/viewvc?rev=1296512&view=rev
Log:
#2735 - Proxy : Add a Sampler Creator to allow plugging HTTP based samplers using potentially non textual POST Body (AMF, Silverlight...) and customizing them for others

Added:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/AbstractSamplerCreator.java (with props)
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java (with props)
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreator.java (with props)
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreatorFactory.java (with props)
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
jmeter/trunk/xdocs/changes.xml

@asfimport
Copy link
Collaborator Author

@pmouawad (migrated from Bugzilla):
Date: Fri Mar 2 23:39:17 2012
New Revision: 1296513

URL: http://svn.apache.org/viewvc?rev=1296513&view=rev
Log:
#2735 - Proxy : Add a Sampler Creator to allow plugging HTTP based samplers using potentially non textual POST Body (AMF, Silverlight...) and customizing them for others

Modified:
jmeter/trunk/test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant