Hello, Yes we could be interested in this Sampler if it enables testing Java Serialization. Ideally it would be great if your Sampler could use HTTPSampler GUI.
You can create a Bugzilla Enhancement request and attach your code there. Regarding Sampler Creator interface, changing contract could break existing plugins as its a contract for plugins that want to interact with Proxy. It works like this: - SamplerCreatorFactory relies on contentType to create the SamplerCreator - SamplerCreator create the Sampler impl and popuate it through populateSampler I suppose your issue comes from the fact that content type is not specific which makes your impl finding more difficult as your rely on body content ? but can you explain with a detailed example the issue you face with current contract ? Regards Philippe On Sun, Nov 25, 2012 at 9:52 AM, Etienne Carriere < [email protected]> wrote: > Hi, > > I am currently creating a test plan for an HR software which is a web > application with an Java Applet. The Java Applet discuss with the > server through POST request with a POST body containing binary > content. This binary content is a Java serialized Object. I created a > specific Sampler "Java Serialized sampler" which includes the xstream > version of the serialized object (The GUI is based on "SOAP/XML-RPC > Request). > I have 2 points linked to this sampler : > 1) Are you interested by such Sampler to be integrated upstream ? > 2) In order to generate those samplers through the proxy, I have some > questions about org.apache.jmeter.protocol.http.proxy.Proxy . In the > run method, we have > > SamplerCreator samplerCreator = factory.getSamplerCreator(request, > pageEncodings, formEncodings); > sampler = samplerCreator.createSampler(request, pageEncodings, > formEncodings); > samplerCreator.populateSampler(sampler, request, pageEncodings, > formEncodings); > > I have some issues due to the fact that we split the "create" and the > "populate" step. I have to do a large analysis of the request > (Content-type, parsing the body) to choose the type of sampler. We can > have the same reflexion for all "non Pure HTTP" sampler (for example, > the SOAP/XML-RPC). > > I would like to discuss about how to implement it properly such that > it could be integrated upstream . > > I see different methods > 1) Create a specific Sampler Creator (it can be done if we can do a > partition of the "Content type") that will have a "complete" > createSampler and a "empty" populateSampler > 2) Change the contract of the SamplerCreator interface. It seems that > the only call of createSampler and populateSampler are in this class . > > Thanks in advance for the advice, > > Best Regards, > > Etienne Carrière > -- Cordialement. Philippe Mouawad.
