"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "docs/recorder.html" of archive TestMaker.zip:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

  
  <title>TestMaker New Agent Wizard Recorder</title>
</head>


<body>


<table bgcolor="#0000cc" border="0" cellpadding="0" cellspacing="1" width="100%">


  <tbody>


    <tr>


      <td>
      
      <table bgcolor="#ffffcc" border="0" cellpadding="0" cellspacing="0" width="100%">


        <tbody>


          <tr>


            <td width="10">
            
            <p><font face="Arial, Helvetica, sans-serif"><img src="images/blank.gif" x-claris-useimageheight="" align="bottom" height="1" width="10"></font></p>


            </td>


            <td width="120">
            
            <p><font face="Arial, Helvetica, sans-serif"><a href="http://www.pushtotest.com/"><img src="images/ptt_logo_120w.gif" x-claris-useimagewidth="" x-claris-useimageheight="" align="bottom" border="0" height="32" width="120"></a></font></p>


            </td>


            <td width="30">
            
            <p><font face="Arial, Helvetica, sans-serif"><img src="images/blank.gif" x-claris-useimageheight="" align="bottom" height="1" width="30"></font></p>


            </td>


            <td>
            
            <p><font face="Arial, Helvetica, sans-serif">User
Guide</font></p>


            </td>


            <td rowspan="3" valign="top"><font face="Arial, Helvetica, sans-serif"><img src="images/blank.gif" x-claris-useimageheight="" align="bottom" height="1" width="15"></font></td>


            <td rowspan="3" valign="top">
            
            <p><font face="Arial, Helvetica, sans-serif" size="-1">Related topics</font></p>


            
            <table border="0" cellpadding="0" cellspacing="0" width="100%">


              <tbody>


                <tr>


                  <td valign="top">
                  
                  <p><font face="Arial, Helvetica, sans-serif"><a href="index.html#Briefing"><font size="-1">TestMaker
Briefing<br>


                  </font></a><font size="-1"><a href="tutorial.html">TestMaker Tutorial<br>


                  </a><a href="example_agents.html">Recording
AgentsExample Agents</a><br>


                  <a href="file:///Users/frankcohen/dev/tm44/TestMaker/docs/recorder.html">Recording
Agents</a><br>


                  <a href="xstest.html">XSTest Load Test</a><br>


                  <a href="script_guide/script_index.html">TestMaker
Script Guide<br>


                  </a><a href="tool_guide/tool_index.html">TOOL
Guide<br>


                  </a><a href="lessons/mailprotocol.html">Testing
Email Services</a></font></font></p>


                  </td>


                  <td valign="top">
                  
                  <p><font face="Arial, Helvetica, sans-serif" size="-1"><a href="faq.html">Frequently Asked
Questions</a><br>


                  <a href="license.html">License Details<br>


                  </a><a href="testnetwork/testnetwork.html">TestMaker
Platform (TestNetwork)<br>


                  </a><a href="support.html">Support
Options</a><a href="http://www.pushtotest.com/ptt/partners.html"><br>


                  </a><a href="http://www.pushtotest.com/Downloads/downloadtmdoc.html">Updates
&amp; Downloads</a> (on-line)<br>


                  <a href="http://docs.pushtotest.com/">On-line
Documents</a></font></p>


                  </td>


                </tr>


              
              </tbody>
            
            </table>


            </td>


          </tr>


          <tr>


            <td width="10">
            
            <p><font face="Arial, Helvetica, sans-serif"><img src="images/blank.gif" x-claris-useimageheight="" align="bottom" height="1" width="10"></font></p>


            </td>


            <td width="120">
            
            <p><font face="Arial, Helvetica, sans-serif"><img src="images/blank.gif" x-claris-useimageheight="" align="bottom" height="1" width="120"></font></p>


            </td>


            <td width="30">
            
            <p><font face="Arial, Helvetica, sans-serif"><img src="images/blank.gif" x-claris-useimageheight="" align="bottom" height="1" width="30"></font></p>


            </td>


            <td valign="top">
            
            <p><font face="Arial, Helvetica, sans-serif" size="-1">Published: April 17,&nbsp;</font><font face="Arial, Helvetica, sans-serif" size="-1">2006</font><br>
            <font face="Arial, Helvetica, sans-serif" size="-1">

Applies to: TestMaker 4.4</font></p>


            </td>


          </tr>


          <tr>


            <td width="10">
            
            <p><font face="Arial, Helvetica, sans-serif"><img src="images/blank.gif" x-claris-useimageheight="" align="bottom" height="1" width="10"></font></p>


            </td>


            <td width="120">
            
            <p><font face="Arial, Helvetica, sans-serif"><img src="images/blank.gif" x-claris-useimageheight="" align="bottom" height="1" width="120"></font></p>


            </td>


            <td width="30">
            
            <p><font face="Arial, Helvetica, sans-serif"><img src="images/blank.gif" x-claris-useimageheight="" align="bottom" height="1" width="30"></font></p>


            </td>


            <td valign="top">
            
            <p><font face="Arial, Helvetica, sans-serif"><img src="images/blank.gif" x-claris-useimageheight="" align="bottom" height="1" width="30"></font></p>


            </td>


          </tr>


        
        </tbody>
      
      </table>


      </td>


    </tr>


  
  </tbody>
</table>


<h1><font face="Arial"><br>


New Agent Wizard: Recorder</font></h1>


<p><font face="Arial, Helvetica, sans-serif">TestMaker
offers a New Agent Wizard to write test agent scripts for you. The
Recorder is a type of New Agent Wizard that watches you use a Web
browser and writes a test agent script automatically. You play-back the
recorded test agent script to check the Web application for
functionality. The recorded test agent script may optionally be used
with <a href="../XSTest/readme.html">XSTest</a> to
perform a scalability and performance test on the Web application. The
recorded test agent script may also optionally be used as a Quality of
Service monitor using the Service Monitor System (SMS.)</font></p>


<p><font face="Arial, Helvetica, sans-serif">This
section describes these topics:</font></p>


<ul>


  <li><font face="Arial, Helvetica, sans-serif"><a href="#brieftutorial">A Brief Tutorial<br>


    <br>


    </a></font></li>


  <li><font face="Arial, Helvetica, sans-serif"><a href="#AdvancedOptions">Advanced Options</a><br>


    <br>


    </font></li>


  <li><a href="#CustomAdvancedOptions"><font face="Arial, Helvetica, sans-serif">Customizing Advanced
Options</font></a></li>


</ul>


<p>&nbsp;</p>


<hr>

<h3><font color="#0000cc" face="Arial"><a name="brieftutorial"></a>A Brief Tutorial</font></h3>


<p><font face="Arial, Helvetica, sans-serif">The <a href="recorder.html">Agent Recorder</a> watches you
drive a Web-enabled application using your browser and writes a test
agent script for you. You may play-back the test agent script in
TestMaker or from the command-line to perform a functional (unit) test.
Recorded test agents may be plugged-into the <a href="../XSTest/readme.html">XSTest framework</a> to
conduct scalability, performance and plugged-into the Service Monitor
System (SMS) for a live dashboard that monitors the service.</font></p>


<p><font face="Arial, Helvetica, sans-serif">The
Recorder is built around a smart proxy server that watches for HTTP
traffic between your browser and the service. The proxy decodes HTTP
GET and POST commands from the browser and the responses from the
server. The proxy then writes the Jython and TOOL script commands
necessary to replay your use of the Web-enabled application. This
design supports HTTP 1.0 and 1.1 compliant browsers, including the use
of JavaScript, plug-ins, and ActiveX objects, and Java applets.</font></p>


<p><font face="Arial, Helvetica, sans-serif">The
Agent Recorder does not support HTTPS connections. By the time the
TestMaker proxy receives the request from the browser, the request is
encrypted and TestMaker is not able to decode the body of the HTTP
protocol. The only workaround at this time is to temporarily host your
application with SSL encryption turned-off while you record the test
and then turn on SSL encryption when you play-back the test.</font></p>


<p><font face="Arial, Helvetica, sans-serif">Before
using the Recorder you will need to configure your browser to
communicate through the Recorder proxy. By default, TestMaker sets the
proxy port to 8090. Your browser preferences is usually the place to
set the used proxy port to be used. Each browser is different at
controlling the proxy server. For example, in Microsoft Internet
Explorer 6.0 for Windows 2000, the proxy server settings are found by
choosing the Internet Options command in the Tools drop-down menu.
Choose the Connections tab and click the LAN Settings... button. The
lower portion of the dialog that appears controls the Proxy server
settings.</font></p>


<p><font face="Arial, Helvetica, sans-serif"><img src="images/F5-7.jpg" border="1" height="453" width="406"></font></p>


<p><font face="Arial, Helvetica, sans-serif">If port
8090 is already in use on your system then change the TestMaker proxy
server to use a different port number. In TestMaker choose the
Preferences command in the Help drop-down menu and then choose the
Recorder tab.</font></p>


<p><font face="Arial, Helvetica, sans-serif">With
the proxy settings configured, every request from the browser will go
through TestMaker's proxy server. This has a side effect in that
TestMaker needs to be running for you to use your browser.</font></p>


<p><font face="Arial, Helvetica, sans-serif">Next we
will Record a test of the Web-enabled application hosted at <a href="http://examples.pushtotest.com">examples.pushtotest.com</a>.
The application is a simple servlet that responds with Web pages.
Depending on the parameters send to the servlet the response can be a
Web page containing random content, responses to HTTP Post commands
with HTML forms, and provides a Web site with HTML links our recorded
test will follow.</font></p>


<p><font face="Arial, Helvetica, sans-serif">Follow
these steps:</font></p>


<p><font face="Arial, Helvetica, sans-serif">1.
Configure your browser to use Proxy port 8090.</font></p>


<p><font face="Arial, Helvetica, sans-serif">2.
Start TestMaker.</font></p>


<p><font face="Arial, Helvetica, sans-serif"> 3.
Choose </font><font face="Arial, Helvetica, sans-serif">
File -&gt; New -&gt; HTML Agent Recorder or click the Recorder
button.</font></p>


<p><font face="Arial, Helvetica, sans-serif">4.
TestMaker displays a dialog asking for the name of the new test agent.
Type MyFirstTest.</font></p>


<p><font face="Arial, Helvetica, sans-serif"><img src="images/recorder1.JPG" height="284" width="668"><br>


<br>


5. Click the Start Recording button.</font></p>


<p><font face="Arial, Helvetica, sans-serif">6. P</font><font face="Arial, Helvetica, sans-serif">oint your browser to
this URL: <a href="http://examples.pushtotest.com/responder/htmlresponder">http://examples.pushtotest.com/responder/htmlresponder</a><br>


</font></p>


<p><font face="Arial, Helvetica, sans-serif"><img src="images/F5-9.gif" height="486" width="598"></font></p>


<p><font face="Arial, Helvetica, sans-serif">7.
Click the file2.html link. You should find the link about halfway down
the Web page. </font></p>


<p><font face="Arial, Helvetica, sans-serif">8. The
browser will display a new Web page that contains two forms. In the
top-most form, enter your first and last name, and your phone number.
Then enter 1081 as the account number and 75.36 in the amount field.
Click the Transfer Funds button. </font></p>


<p><font face="Arial, Helvetica, sans-serif">9. Your
browser will show a new Web page that echoes the HTML form information
you submitted on the previous page.</font></p>


<p><font face="Arial, Helvetica, sans-serif">10.
Return to TestMaker and click the Stop Recording button. </font></p>


<p><font face="Arial, Helvetica, sans-serif">11.
TestMaker will display a standard file selector dialog. Navigate to the
directory you wish to store the new agent, enter a file name for the
agent, and click the Save button. </font></p>


<p><font face="Arial, Helvetica, sans-serif">12. The
new test agent script will appear in the Editor panel in TestMaker. </font></p>


<p><font face="Arial, Helvetica, sans-serif">Congratulations.
You recorded your first test agent script.</font></p>


<p><font face="Arial, Helvetica, sans-serif">To
play-back the new agent script, click the Run icon in the Execution
panel. Alternatively you may choose the Run command in the Agent
drop-down menu. </font></p>


<p><font face="Arial, Helvetica, sans-serif">The
agent will replay the steps you took while using the browser to drive
the Web-enabled application on the examples.pushtotest.com domain. You
will see the results of the play-back in the Output panel.</font></p>


<p>&nbsp;</p>


<hr>
<h3><font color="#0000cc" face="Arial"><a name="AdvancedOptions"></a>Advanced Options</font></h3>


<p><font face="Arial, Helvetica, sans-serif">The
Recorder includes several advanced options to make the recorded scripts
act in real-world manner. The advanced options include the ability to
load image references embedded in an retrieved Web page, follow
302-redirect responses from the Web host, and much more. The Recorder's
advanced options are viewed by clicking the Advanced Options button
from the Recorder window. Click the Advanced Options button to expand
the window to see the following interface:</font></p>


<p>&nbsp;</p>


<p align="center"><font face="Arial, Helvetica, sans-serif"><img src="images/recorder2.JPG" height="615" width="688"></font></p>


<p>&nbsp;</p>


<p><font face="Arial, Helvetica, sans-serif">The
Recorder offers the following advanced options:</font></p>


<p><font color="#0000cc" face="Arial, Helvetica, sans-serif"><strong>Log To</strong></font></p>


<p><font face="Arial, Helvetica, sans-serif">As
TestMaker runs a test agent script it outputs logged informational and
results information. This controls the destination of the logged data.</font></p>


<ul>


  <li><font face="Arial, Helvetica, sans-serif">Output
Panel - Displays logged data into the output panel of the TestMaker
graphic interface (the lower right corner.)<br>


    <br>


    </font></li>


  <li><font face="Arial, Helvetica, sans-serif">File
- Writes logged data to the file defined in "Log path/name".<br>


    <br>


    </font></li>


  <li><font face="Arial, Helvetica, sans-serif">File
with response - Writes the logged data in XML format to the file define
in "Log path/name". The XML file format is defined in
testmaker_home/docs/results.xsd. The file format saves the request
header and body and the response header and body.<br>


    <br>


    </font></li>


  <li><font face="Arial, Helvetica, sans-serif">Database
- Writes the logged data to a relational database using your provided
JDBC driver. This requires you to edit testmaker_home/lib/agentbase.py
to configure the JDBC driver.</font></li>


</ul>


<p><font color="#0000cc" face="Arial, Helvetica, sans-serif"><strong>Log
Path/Name</strong></font></p>


<p><font face="Arial, Helvetica, sans-serif">Destination
file name and path to write the logged data TestMaker generates while
running a test agent. The Browse button displays a standard file
selector to graphically navigate the file system and directories.</font></p>


<p><font color="#0000cc" face="Arial, Helvetica, sans-serif"><strong>Log Level</strong></font></p>


<p><font face="Arial, Helvetica, sans-serif">Controls
the amount of information logged by the test agent, including:</font></p>


<ul>


  <li><font face="Arial, Helvetica, sans-serif">0 -
No logging</font></li>


  <li><font face="Arial, Helvetica, sans-serif">1 -
Major operations. This logs information messages only. For example, the
test agent logs informational notices on when the test has finished
setting-up for a test.</font></li>


  <li><font face="Arial, Helvetica, sans-serif">2 -
Details. This instructs the test agent to display the contents of an
HTTP request and response.</font></li>


  <li><font face="Arial, Helvetica, sans-serif">3 -
Debug. The test agent displays all information and detailed
information, plus additional details that may be useful while debugging
test agent scripts.</font></li>


</ul>


<p><font color="#0000cc" face="Arial, Helvetica, sans-serif"><strong>Sleep Time</strong></font></p>


<p><font face="Arial, Helvetica, sans-serif">This
setting controls the minimum and maximum amount of time, in seconds, to
pause between Web page requests. You set the minimum and maximum values
and the test agent chooses an amount of time between the two values to
pause.</font></p>


<p><font color="#0000cc" face="Arial, Helvetica, sans-serif"><strong>Success
Responses</strong></font></p>


<p><font face="Arial, Helvetica, sans-serif">This is
a Regular Express (regex) defining the HTTP response codes that
indicate the request was accepted by the Web host. By default this
regex considers HTTP response codes of 200-299, and 300-304, and others
to be successful responses. HTTP response codes of 500, for example,
are not part of the regex and so the test agent throws an exception.</font></p>


<p><font color="#0000cc" face="Arial, Helvetica, sans-serif"><strong>Follow
HTTP 302 Redirects</strong></font></p>


<p><font face="Arial, Helvetica, sans-serif">Web
hosts may return a 302 response code to direct a Web browser to load
another page. Checking this field tells the test agent at runtime to
follow 302 reponse codes and load them automatically.</font></p>


<p><font color="#0000cc" face="Arial, Helvetica, sans-serif"><strong>Load
&lt;IMG&gt; Tag References</strong></font></p>


<p><font face="Arial, Helvetica, sans-serif">When
checked the recorded test agent will automatically parse a retrieved
Web page for &lt;img&gt; image tag references and make HTTP
requests to load the images. If File with response is checked then the
test agent will store the URL, time it takes to load the image, and
image size in bytes for each image in the Web page.</font></p>


<p><font face="Arial, Helvetica, sans-serif">TestMaker
uses the <a href="http://mercury.ccil.org/%7Ecowan/XML/tagsoup/">TagSoup</a>
library to parse HTML pages for &lt;img&gt; tag references.
Instead of parsing well-formed or valid XML, TagSoup parses HTML as it
is found in the wild: nasty and brutish world of the Web. It makes a
best effort to parse a Web page. The test agent will show errors in the
logged data when they occur.</font></p>


<p><font color="#0000cc" face="Arial, Helvetica, sans-serif"><strong>Load
&lt;IMG&gt; Tag References</strong></font></p>


<p><font face="Arial, Helvetica, sans-serif">This
determines the number of seconds the test agent will pause before
loading the next &lt;img&gt; tag reference.</font></p>


<p><font color="#0000cc" face="Arial, Helvetica, sans-serif"><strong>Emulate
Browser Image Caching</strong></font></p>


<p><font face="Arial, Helvetica, sans-serif">Web
browsers usually store downloaded images in a local cache. When checked
this instructs the test agent to avoid loading the same
&lt;img&gt; tag references more than once.</font></p>


<p></p>


<p></p>


<p></p>


<hr>
<h3><font color="#0000cc" face="Arial"><a name="CustomAdvancedOptions" id="CustomAdvancedOptions"></a>Customizing
Advanced Options</font></h3>


<p><font face="Arial, Helvetica, sans-serif">Test
agent scripts created by the TestMaker Recorder implement a Jython
class that inherits the advaned option functions from a base class
found in testmaker_home/lib/agentbase.py. </font></p>


<p><font face="Arial, Helvetica, sans-serif">We
encourage you to read through the agentbase.py script and make changes
that help you improve your recorded scripts. In some cases you will
need to change agentbase.py to enable a function. For example, the Log
to Database option requires you to configure your JDBC driver in
agentbase.py.</font></p>


<p><font face="Arial, Helvetica, sans-serif">We also
encourage you to share your changes and improvements with the TestMaker
open-source community. Send your improvements to <a href="mailto:info@pushtotest.com">info@pushtotest.com</a>.
Thanks, in advance.<br>


</font> </p>


<hr>
<font face="Arial, Helvetica, sans-serif">What comes next?
Try one of these:</font>
<p><a href="script_guide/script_index.html"><font face="Arial">TestMaker
Script Language Reference</font></a></p>


<p><a href="tool_guide/tool_index.html"><font face="Arial">Reference
to the TOOL test object library</font></a></p>


<p><a href="example_agents.html"><font face="Arial">A guide to the
example agents that come with TestMaker</font></a></p>


<p><a href="faq.html"><font face="Arial">A
list of frequently asked
questions</font></a></p>


<p><a href="lessons/mailprotocol.html"><font face="Arial">Building
test agents to check email services for scalability and
functionality</font></a></p>


<br>


<br>


<table bgcolor="#0000cc" border="0" cellpadding="0" cellspacing="1" width="100%">


  <tbody>


    <tr>


      <td>
      
      <table bgcolor="#ffffcc" border="0" cellpadding="0" width="100%">


        <tbody>


          <tr>


            <td width="10">
            
            <p><font face="Arial"><img src="images/blank.gif" x-claris-useimageheight="" align="bottom" height="1" width="10"></font></p>


            </td>


            <td width="120">
            
            <p><a href="http://www.pushtotest.com"><font face="Arial"><img src="images/ptt_logo_120w.gif" x-claris-useimagewidth="" x-claris-useimageheight="" align="bottom" border="0" height="32" width="120"></font></a></p>


            </td>


            <td width="30">
            
            <p><font face="Arial"><img src="images/blank.gif" x-claris-useimageheight="" align="bottom" height="1" width="30"></font></p>


            </td>


            <td>
            
            <p><font face="Arial" size="-1">Additional
documentation, product downloads and updates are at <a href="http://www.pushtotest.com">www.PushToTest.com</a>.
While the TestMaker software is distributed under an open-source
license, the documentation remains (c) 2006 PushToTest. All rights
reserved.</font></p>


            </td>


          </tr>


        
        </tbody>
      
      </table>


      </td>


    </tr>


  
  </tbody>
</table>


</body>
</html>