Author: sebb
Date: Tue Jun 24 05:04:49 2008
New Revision: 671147

URL: http://svn.apache.org/viewvc?rev=671147&view=rev
Log:
Document how Assertions and Post-Processors handle sub-samples.

Modified:
    jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=671147&r1=671146&r2=671147&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml Tue Jun 24 
05:04:49 2008
@@ -2600,10 +2600,18 @@
 
 <section name="&sect-num;.5 Assertions" anchor="assertions">
 <description>
-       <br></br>
-       Assertions are used to perform additional checks on samplers, and are 
processed after <b>each sampler</b>
+       <p>
+       Assertions are used to perform additional checks on samplers, and are 
processed after <b>every sampler</b>
        in the same scope.
-       <br></br>
+       To ensure that an Assertion is applied only to a particular sampler, 
add it as a child of the sampler.
+       </p>
+    <p>
+    Note: Unless documented otherwise, Assertions are not applied to 
sub-samples (child samples) -
+    only to the parent sample.
+    In the case of BSF and BeanShell Assertions, the script can retrieve 
sub-samples using the method
+    <code>prev.getSubResults()</code> which returns an array of SampleResults.
+    The array will be empty if there are none.
+    </p>
        <note>
        The variable <b>JMeterThread.last_sample_ok</b> is set to
        "true" or "false" after all assertions for a sampler have been run.
@@ -3356,11 +3364,18 @@
 
 <section name="&sect-num;.8 Post-Processors" anchor="postprocessors">
        <description>
-       <br></br>
+       <p>
                As the name suggests, Post-Processors are applied after 
samplers. Note that they are
                applied to <b>all</b> the samplers in the same scope, so to 
ensure that a post-processor
                is applied only to a particular sampler, add it as a child of 
the sampler.
-       <br></br>
+       </p>
+       <p>
+       Note: Unless documented otherwise, Post-Processors are not applied to 
sub-samples (child samples) -
+       only to the parent sample.
+       In the case of BSF and BeanShell post-processors, the script can 
retrieve sub-samples using the method
+       <code>prev.getSubResults()</code> which returns an array of 
SampleResults.
+       The array will be empty if there are none.
+       </p>
        </description>
 <component name="Regular Expression Extractor" index="&sect-num;.8.1"  
width="494" height="257" screenshot="regex_extractor.png">
 <description><p>Allows the user to extract values from a server response using 
a Perl-type regular expression.  As a post-processor,
@@ -3501,13 +3516,20 @@
 </component>
 
 <component name="Save Responses to a file" index="&sect-num;.8.4"  width="361" 
height="165" screenshot="savetofile.png">
-       <description>This test element can be placed anywhere in the test plan.
+       <description>
+           <p>
+           This test element can be placed anywhere in the test plan.
                For each sample in its scope, it will create a file of the 
response Data.
                The primary use for this is in creating functional tests.
                The file name is created from the specified prefix, plus a 
number.
                The file extension is created from the document type, if known.
+               If not known, the file extension is set to 'unknown'.
                The generated file name is stored in the sample response, and 
can be saved
                in the test log output file if required.
+               </p>
+               <p>
+               The current sample is saved first, followed by any sub-samples 
(child samples).
+               </p>
        </description>
  <properties>
  <property name="Name" required="No">Descriptive name for this element that is 
shown in the tree.</property>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to