You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by kh...@apache.org on 2001/11/25 17:08:58 UTC

cvs commit: jakarta-jmeter/docs/usermanual assertion.html

khammond    01/11/25 08:08:58

  Added:       docs/usermanual assertion.html
  Log:
  Added lots of stuff. Almost complete.
  
  Revision  Changes    Path
  1.1                  jakarta-jmeter/docs/usermanual/assertion.html
  
  Index: assertion.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  
  <!-- Content Stylesheet for Site -->
  
          
  <!-- start the processing -->
      <!-- ====================================================================== -->
      <!-- Main Page Section -->
      <!-- ====================================================================== -->
      <html>
          <head>
              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
  
                          
              <title>JMeter - User's Manual: Assertions</title>
          </head>
  
          <body bgcolor="#ffffff" text="#000000" link="#525D76">        
              <table border="0" width="100%" cellspacing="0">
                  <!-- TOP IMAGE -->
                  <tr>
                      <td colspan="2">
  <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a>
  </td>
                  </tr>
              </table>
              <table border="0" width="100%" cellspacing="4">
                  <tr><td colspan="2">
                      <hr noshade="" size="1"/>
                  </td></tr>
                  
                  <tr>
                      <!-- LEFT SIDE NAVIGATION -->
                      <td width="20%" valign="top" nowrap="true">
                                  <p><strong>About</strong></p>
          <ul>
                      <li>    <a href="../index.html">Overview</a>
  </li>
                      <li>    <a href="http://jakarta.apache.org/builds/jakarta-jmeter/">Download</a>
  </li>
                      <li>    <a href="../installing.html">Install</a>
  </li>
                      <li>    <a href="../running.html">Running</a>
  </li>
                      <li>    <a href="../extending/index.html">Extending</a>
  </li>
                      <li>    <a href="../changes.html">Changes</a>
  </li>
                      <li>    <a href="http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&product=JMeter&short_desc=&short_desc_type=substring&long_desc=&long_desc_type=substring&bug_file_loc=&bug_file_loc_type=substring&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&order=Reuse+same+sort+as+last+time">Known Bugs</a>
  </li>
                      <li>    <a href="../license.html">License</a>
  </li>
                      <li>    <a href="../todo.html">TODO</a>
  </li>
                  </ul>
              <p><strong>User Manual</strong></p>
          <ul>
                      <li>    <a href="../user_manual/index.html">Overview</a>
  </li>
                      <li>    <a href="../user_manual/threadgroups.html">ThreadGroups</a>
  </li>
                      <li>    <a href="../user_manual/test_samples.html">Generative Controls</a>
  </li>
                      <li>    <a href="../user_manual/logical_controllers.html">Logical Controls</a>
  </li>
                      <li>    <a href="../user_manual/visualizers.html">Visualizers</a>
  </li>
                      <li>    <a href="../user_manual/timers.html">Timers</a>
  </li>
                      <li>    <a href="../user_manual/assertions.html">Assertions</a>
  </li>
                      <li>    <a href="../user_manual/running.html">Running a Test</a>
  </li>
                      <li>    <a href="../user_manual/saving.html">Saving/Loading</a>
  </li>
                      <li>    <a href="../user_manual/rmi.html">Distributed JMeter</a>
  </li>
                      <li>    <a href="../user_manual/proxy_server.html">Recording Browser Activity</a>
  </li>
                      <li>    <a href="../user_manual/ready_components.html">Built-in Components</a>
  </li>
                      <li>    <a href="../user_manual/sslmanager.html">Using the SSL Manager</a>
  </li>
                  </ul>
              <p><strong>Community</strong></p>
          <ul>
                      <li>    <a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
  </li>
                      <li>    <a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
  </li>
                      <li>    <a href="http://jakarta.apache.org/site/cvsindex.html">CVS Repositories</a>
  </li>
                  </ul>
                          </td>
                      <td width="80%" align="left" valign="top">
                                                                      <table border="0" cellspacing="0" cellpadding="2" width="100%">
        <tr><td bgcolor="#525D76">
          <font color="#ffffff" face="arial,helvetica,sanserif">
            <a name="4.5 Assertions"><strong>4.5 Assertions</strong></a>
          </font>
        </td></tr>
        <tr><td>
          <blockquote>
                                      <p><b>WORK IN PROGRESS</b></p>
                                                  <p>Assertions allow you to assert facts about responses received from the 
  server being tested. Using an assertion, you can essentially "test" that your 
  application is returning the results you expect it to. </p>
                                                  <p>For instance, you can assert that the response to a query will contain some 
  particular text. The text you specify can be a Perl-style regular expression, and 
  you can indicate that the response is to contain the text, or that it should match 
  the whole response.</p>
                                                  <p>You can add an assertion to any Generative Controller. For example, you can 
  add an assertion to a HTTP Request that checks for the text, "&lt;/HTML&gt;".  JMeter 
  will then check that the text is present in the HTTP response.  If JMeter cannot find the 
  text, then it will mark this as a failed request.</p>
                                                  <p>To view the assertion results, add an Assertion Listener to the Thread Group.</p>
                                                  <p><b>Control Panel</b></p>
                                                  <p><img src="../images/screenshots/assertion/assertion.gif" width="446" height="296" />
  <br>Figure 1 - Assertion Control Panel</br></p>
                                                  <p>Properties:
  <ul>
    <li>Name - Descriptive name for this element that is shown in the tree. </li>
    <li><i>Response Field to Test</i></li>
    <ul>
      <li>Text Response - </li>
      <li>URL Sampled - </li>
    </ul>
    <li><i>Pattern Matching Rules</i></li>
    <ul>
      <li>Contains - </li>
      <li>Matches - </li>
      <li>Not - </li>
    </ul>
    <li><i>Patterns to Test</i></li>
    <ul>
      <li>(Text Area) - </li>
      <li>Add Button - </li>
      <li>Clear Button - </li>
    </ul>
  </ul>
  </p>
                                                  <p><b>Example</b></p>
                                                  <p><img src="../images/screenshots/assertion/example1a.gif" width="190" height="170" />
  <br>Figure 2 - Test Plan</br></p>
                                                  <p><img src="../images/screenshots/assertion/example1b.gif" width="489" height="298" />
  <br>Figure 3 - Assertion Control Panel with Pattern</br></p>
                                                  <p><img src="../images/screenshots/assertion/example1c-pass.gif" width="474" height="265" />
  <br>Figure 4 - Assertion Listener Results (Pass)</br></p>
                                                  <p><img src="../images/screenshots/assertion/example1c-fail.gif" width="474" height="265" />
  <br>Figure 5 - Assertion Listener Results (Fail)</br></p>
                                                  <p>The assertion control panel let's you add strings to be tested. These strings can 
  be regular expressions. You can also choose whether the strings will be expected 
  to match the entire response, or if the response is only expected to contain the 
  strings. You can attach multiple assertions to any controller for additionaly flexibility.</p>
                              </blockquote>
          </p>
        </td></tr>
        <tr><td><br/></td></tr>
      </table>
                                          </td>
                  </tr>
  
                  <!-- FOOTER -->
                  <tr><td colspan="2">
                      <hr noshade="" size="1"/>
                  </td></tr>
                  <tr><td colspan="2">
                      <div align="center"><font color="#525D76" size="-1"><em>
                      Copyright &#169; 1999-2001, Apache Software Foundation
                      </em></font></div>
                  </td></tr>
              </table>
          </body>
      </html>
  <!-- end the processing -->
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>