sebb        2004/06/05 07:44:28

  Modified:    src/core/org/apache/jmeter/resources Tag: rel-2_0
                        messages.properties
               src/components/org/apache/jmeter/assertions Tag: rel-2_0
                        BeanShellAssertion.java
               xdocs/images/screenshots Tag: rel-2_0 bsh_assertion.png
               xdocs/usermanual Tag: rel-2_0 component_reference.xml
  Log:
  Remove Result from BSH Assertion; update documentation and screenshot
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.106.2.5 +1 -1      
jakarta-jmeter/src/core/org/apache/jmeter/resources/messages.properties
  
  Index: messages.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages.properties,v
  retrieving revision 1.106.2.4
  retrieving revision 1.106.2.5
  diff -u -r1.106.2.4 -r1.106.2.5
  --- messages.properties       3 Jun 2004 23:01:34 -0000       1.106.2.4
  +++ messages.properties       5 Jun 2004 14:44:28 -0000       1.106.2.5
  @@ -38,7 +38,7 @@
   bsf_script_file=Script file to run
   bsf_script_language=Scripting language\:
   bsf_script_parameters=Parameters to pass to script/file\:
  -bsh_assertion_script=Script (Response[Data|Code|Message|Headers], RequestHeaders, 
Sample[Label|rData], Result, Failure[Message])
  +bsh_assertion_script=Script (IO: Failure[Message], Response. IN: 
Response[Data|Code|Message|Headers], RequestHeaders, Sample[Label|rData])
   bsh_assertion_title=BeanShell Assertion
   bsh_function_expression=Expression to evaluate
   bsh_sampler_title=BeanShell Sampler
  
  
  
  No                   revision
  No                   revision
  1.3.2.1   +6 -7      
jakarta-jmeter/src/components/org/apache/jmeter/assertions/BeanShellAssertion.java
  
  Index: BeanShellAssertion.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/components/org/apache/jmeter/assertions/BeanShellAssertion.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- BeanShellAssertion.java   30 Mar 2004 18:06:39 -0000      1.3
  +++ BeanShellAssertion.java   5 Jun 2004 14:44:28 -0000       1.3.2.1
  @@ -96,8 +96,7 @@
                        bshInterpreter.set("SamplerData",response.getSamplerData());
                        bshInterpreter.set("Successful",response.isSuccessful());
   
  -                     bshInterpreter.set("Result",result);// Raw access to the result
  -
  +                     // The following are used to set the Result details on return 
from the script:
                        bshInterpreter.set("FailureMessage","");
                        bshInterpreter.set("Failure",false);
   
  @@ -117,7 +116,7 @@
                        result.setError(false);
           }
   /*
  - * To avoid class loading problems when bsh,jar is missing,
  + * To avoid class loading problems when the BSH jar is missing,
    * we don't try to catch this error separately
    *           catch (bsh.EvalError ex)
                {
  @@ -128,10 +127,10 @@
    */
           // but we do trap this error to make tests work better
           catch(NoClassDefFoundError ex){
  -                     result.setError(true);
                        log.error("BeanShell Jar missing? "+ex.toString());
  +                     result.setError(true);
  +                     result.setFailureMessage("BeanShell Jar missing? 
"+ex.toString());
                        response.setStopThread(true); // No point continuing
  -                     result.setFailureMessage("");
           }
                catch (IOException ex)
                {
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +16 -7     jakarta-jmeter/xdocs/images/screenshots/bsh_assertion.png
  
        <<Binary file>>
  
  
  No                   revision
  No                   revision
  1.87.2.6  +25 -5     jakarta-jmeter/xdocs/usermanual/component_reference.xml
  
  Index: component_reference.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/xdocs/usermanual/component_reference.xml,v
  retrieving revision 1.87.2.5
  retrieving revision 1.87.2.6
  diff -u -r1.87.2.5 -r1.87.2.6
  --- component_reference.xml   3 Jun 2004 23:01:35 -0000       1.87.2.5
  +++ component_reference.xml   5 Jun 2004 14:44:28 -0000       1.87.2.6
  @@ -1436,9 +1436,29 @@
   
   <properties>
   <property name="Name" required="">Descriptive name for this element that is shown 
in the tree.</property>
  -<property name="Script" required="Yes">The BeanShell script to run</property>
  -
  +<property name="Parameters" required="No">Parameters to pass to the BeanShell 
script.
  +     The parameters are stored in the following variables:
  +     <ul>
  +             <li>Parameters - string containing the parameters as a single 
variable</li>
  +         <li>bsh.args - String array containing parameters, split on 
white-space</li>
  +     </ul></property>
  +<property name="Script file" required="No">A file containing the BeanShell script 
to run</property>
  +<property name="Script" required="No">The BeanShell script to run</property>
   </properties>
  +<p>The following variables are defined to the script:
  +<ul>
  +     <li>Response - the response Object; read-write</li>
  +     <li>Failure - boolean; read-write; used to set the Assertion status</li>
  +     <li>FailureMessage - String; read-write; used to set the Assertion message</li>
  +     <li>ResponseData - the response body</li>
  +     <li>ResponseCode - e.g. 200</li>
  +     <li>ResponseMessage - e.g. OK</li>
  +     <li>ResponseHeaders - contains the HTTP headers</li>
  +     <li>RequestHeaders - containse the HTTP headers sent to the server</li>
  +     <li>SampleLabel</li>
  +     <li>SamplerData</li>
  +</ul>
  +</p>
   </component>
   
   <component index="15.5.6" name="MD5Hex Assertion">
  
  
  

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

Reply via email to