jmeter 之后置處理器
18.8.5 BeanShell PostProcessor | ||||||||||||||||||
The BeanShell PreProcessor allows arbitrary code to be applied after taking a sample. For JMeter versions after 2.2 the BeanShell Post-Processor no longer ignores samples with zero-length result data For full details on using BeanShell, please see the BeanShell website. The test element supports the ThreadListener and TestListener methods. These should be defined in the initialisation file. See the file BeanShellListeners.bshrc for example definitions. Control Panel ![]()
The following BeanShell variables are set up for use by the script:
For details of all the methods available on each of the above variables, please check the Javadoc If the property beanshell.postprocessor.init is defined, this is used to load an initialisation file, which can be used to define methods etc for use in the BeanShell script. |
18.8.6 BSF PostProcessor | ||||||||||||||||||
The BSF PostProcessor allows BSF script code to be applied after taking a sample. Control Panel ![]()
The script (or file) is processed using the BSFEngine.exec() method, which does not return a value. Before invoking the script, some variables are set up. Note that these are BSF variables - i.e. they can be used directly in the script.
For details of all the methods available on each of the above variables, please check the Javadoc |
18.9.8 Debug PostProcessor | ||||||||||||||||||
The Debug PostProcessor creates a subSample with the details of the previous Sampler properties, JMeter variables, properties and/or System Properties. The values can be seen in the View Results Tree Listener Response Data pane. Control Panel ![]()
|
| ||||
8.8.4 Result Status Action Handler | |||||||||
This test element allows the user to stop the thread or the whole test if the relevant sampler failed. Control Panel ![]()
|
18.8.3 XPath Extractor | ||||||||||||||||||||||||||||||||||||||||||||||
This test element allows the user to extract value(s) from structured response - XML or (X)HTML - using XPath query language. Control Panel ![]()
To allow for use in a ForEach Controller, the following variables are set on return:
Note: The next refName_n variable is set to null - e.g. if there are 2 matches, then refName_3 is set to null, and if there are no matches, then refName_1 is set to null. XPath is query language targeted primarily for XSLT transformations. However it is usefull as generic query language for structured data too. See XPath Reference or XPath specification for more information. Here are few examples:
| ||||||||||||||||||||||||||||||||||||||||||||||
18.8.1 Regular Expression Extractor | |||||||||||||||||||||||||||||
Allows the user to extract values from a server response using a Perl-type regular expression. As a post-processor, this element will execute after each Sample request in its scope, applying the regular expression, extracting the requested values, generate the template string, and store the result into the given variable name. Control Panel ![]()
If the match number is set to a non-negative number, and a match occurs, the variables are set as follows:
If the match number is set to a negative number, then all the possible matches in the sampler data are processed. The variables are set as follows:
See also Response Assertion for some examples of how to specify modifiers, and for further information on JMeter regular expressions.
| |||||||||||||||||||||||||||||
posted on 2014-03-06 11:10 順其自然EVO 閱讀(2873) 評論(0) 編輯 收藏 所屬分類: jmeter