I have developed 4 new Test Elements for use in JMeter - figured i might as well submit them. The four elements are: Form Filler (Pre Processor) Result Store (Post Processor) System Sampler (Sampler) Multi Value Regex Extractor (Post Processor) Details about those elements: Form Filler (Pre-Processor): Extracts form elements from a HTML Result object, and then populates the sampler parameters. The sampler parameters to be populated are specified using (configurable) flags. The HTML Result object to use defaults to the previous response - however, a Result Store can be specified, and it will be used instead. Result Store (Post Processor): Takes the response object, and places it in a variable. The Result Store then places a reference to itself into the ThreadContext, so that other elements can find and reference it. Currently, only the Form Filler (part of this collection) makes use of this Result Store. System Sampler (Sampler): A basic sampler object that can be used to execute commands on the local machine. Developed to allow the external processing of data files part way through a test, it should allow execution of any command that can be run from the command line. In a basic attempt at completeness, calls to sampleStart/sampleEnd are included. Validation of the return code can be enabled, and the expected return code can be specified. Multi Value Regex Extractor (Post Processor): An extension to the existing Regular Expression Extractor, the Multi Value version allows processing of all matches. Each match is formed into a template (as with the original version) but afterwards, templates are strung together using a second configurable template. This element was implemented to allow for handling of multi-value HTML lists. Testing: The elements have all been used in my current test scripts, but the testing has not been too thorough - they were developed as a quick fix for specific problems i was having. Specifically, the Form Filler has only been tested as a child to a single sampler. It should work when placed at a higher level (each as child to a logic controller containing multiple samplers), but no guarantees :) The Result Store has only been tested as a child to a single sampler. It should probably be restricted to this case, as it would not make sense for it to be used at a higher level (it can only hold one response object, so it should be unique for each sampler). However, i am not currently certain of how to restrict it.
Created attachment 18585 [details] source code for the new Test Elements
Thank you for the contribution. Hopefully either sebb or I will have time to take a look and include your contributions in a future release. I thank you on behalf of the users and developers peter
Included System Sampler in Bug 53164
Date: Mon Apr 30 15:05:46 2012 New Revision: 1332231 URL: http://svn.apache.org/viewvc?rev=1332231&view=rev Log: Bug 53164 - New System Sampler Added: jmeter/trunk/src/protocol/native/ jmeter/trunk/src/protocol/native/org/ jmeter/trunk/src/protocol/native/org/apache/ jmeter/trunk/src/protocol/native/org/apache/jmeter/ jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/ jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/ jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/NativeCommand.java (with props) jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamGobbler.java (with props) jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/SystemSampler.java (with props) jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/gui/ jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/gui/SystemSamplerGui.java (with props) Modified: jmeter/trunk/build.xml jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/xdocs/changes.xml
Reviewing code here are my thoughts: - Result Store : might be useful, could nearly be integrated as is - Form Filler : I don't see how it can be used but if coded it must have some use. Reviewing code I think it has performance impacts as it loads document as DOM , encoding issues as it hard codes 8859_1 charset, coverage as I am not sure it handles all parsing cases - Multi Value Regex Extractor : From my understanding I think feature already exists now in Regular_Expression_Extractor provided Match No is negative - System Sampler has been integrated as Bug 53164 What should we do with this ? I propose to integrate Result Store and abandon other features. Sebb, Rainer, Milamber , what's you opinion ?
Date: Mon Apr 30 21:03:27 2012 New Revision: 1332389 URL: http://svn.apache.org/viewvc?rev=1332389&view=rev Log: Bug 53164 - New System Sampler Removed useless name column Modified: jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/gui/SystemSamplerGui.java Date: Mon Apr 30 21:09:43 2012 New Revision: 1332395 URL: http://svn.apache.org/viewvc?rev=1332395&view=rev Log: Bug 53164 - New System Sampler Oups wrong test Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
(In reply to comment #5) > Reviewing code here are my thoughts: > - Result Store : might be useful, could nearly be integrated as is There needs to be a way to remove the result store variable once it is no longer needed. > - Form Filler : I don't see how it can be used but if coded it must have > some use. Reviewing code I think it has performance impacts as it loads > document as DOM , encoding issues as it hard codes 8859_1 charset, coverage > as I am not sure it handles all parsing cases I think a form-filler could be useful, particularly for forms with dynamic field names. Also for lists - it would be useful to be able to pick list items by number. It would be useful to be able to refer to input fields by position as well as number. But this needs a bit more thought on how to make this easy to use. > - Multi Value Regex Extractor : From my understanding I think feature > already exists now in Regular_Expression_Extractor provided Match No is > negative Agreed. > - System Sampler has been integrated as Bug 53164 > > What should we do with this ? > I propose to integrate Result Store and abandon other features. Not sure there's any point in adding Result Store on its own. Alsoit's simple enough that it can be coded as a BSH or BSF or JSR223 element if required. > Sebb, Rainer, Milamber , what's you opinion ?
Closing as there remains only feature described in 53170. Marking as moved, not sure it's the right status
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1759