Bug 40011 - New Elements for use in JMeter
Summary: New Elements for use in JMeter
Status: RESOLVED MOVED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: Other All
: P2 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on: 53164
Blocks: 53170
  Show dependency tree
 
Reported: 2006-07-11 09:21 UTC by Geoff Willingham
Modified: 2012-05-01 10:55 UTC (History)
1 user (show)



Attachments
source code for the new Test Elements (19.25 KB, application/octet-stream)
2006-07-11 09:22 UTC, Geoff Willingham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff Willingham 2006-07-11 09:21:24 UTC
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.
Comment 1 Geoff Willingham 2006-07-11 09:22:02 UTC
Created attachment 18585 [details]
source code for the new Test Elements
Comment 2 peter lin 2006-07-11 16:18:49 UTC
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
Comment 3 Philippe Mouawad 2012-04-30 15:06:12 UTC
Included System Sampler in Bug 53164
Comment 4 Philippe Mouawad 2012-04-30 15:07:25 UTC
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
Comment 5 Philippe Mouawad 2012-04-30 20:26:02 UTC
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 ?
Comment 6 Philippe Mouawad 2012-04-30 21:11:05 UTC
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
Comment 7 Sebb 2012-04-30 21:19:18 UTC
(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 ?
Comment 8 Philippe Mouawad 2012-05-01 10:55:45 UTC
Closing as there remains only feature described in 53170.
Marking as moved, not sure it's the right status