<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Procedure for updating and testing the TeamShare API</title>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#000099" vlink="#660066" alink="#FF0000">
<div align="center">
<p>
<a href="http://www.ravenbrook.com/">Ravenbrook</a> /
<a href="http://www.ravenbrook.com/project/">Projects</a> /
<a href="http://www.ravenbrook.com/project/p4dti/">Perforce Defect Tracking Integration</a> /
<a href="../../index.html">Version 2.0 Product Sources</a> /
<a href="../index.html">Procedures</a>
</p>
<p><i><a href="http://www.ravenbrook.com/project/p4dti/">Perforce Defect Tracking Integration Project</a></i></p>
<hr />
<h1>Procedure for updating and testing the TeamShare API</h1>
<address>
<a href="mailto:gdr@ravenbrook.com">Gareth Rees</a>,
<a href="http://www.ravenbrook.com/">Ravenbrook Limited</a>,
2001-06-25
</address>
</div>
<h2><a id="section-1" name="section-1">1. Introduction</a></h2>
<p> This document describes the procedure for rebuilding the P4DTI to
use a new release of the TeamShare API, and testing it. </p>
<p> The intended readership is TeamShare engineering and SQA staff. </p>
<p> This document is not confidential. </p>
<h2><a id="section-2" name="section-2">2. Outline procedure</a></h2>
<ol>
<li><p> Obtain the latest release of the Perforce defect tracking
integration kit, as follows. Go to <a
href="http://www.perforce.com/public/perforce/p4dti/index.html#kit">http://www.perforce.com/public/perforce/p4dti/index.html#kit</a>,
pick the latest release. The file you want
will be called something like <code>p4dti-kit-<i>RELEASE</i>.zip</code>.
</p></li>
<li><p> Alternatively, Ravenbrook may send you development snapshots of
the integration kit. The procedure is the same in either
case. </p></li>
<li><p> Download the kit and unpack it on a test machine in a suitable
directory. (I'll call this directory <code>KIT-HOME</code> in the
following). </p></li>
<li><p> Check that the P4DTI works with the old API before trying
anything new. This helps you to distinguish failures in your setup from
failures in the new API. Follow these steps: </p>
<ol>
<li><p> Install a release of TeamTrack that's supported by the P4DTI
kit release you have. Look in the <code>release-notes.txt</code> that
came with the kit to see what's supported. </p></li>
<li><p> Build the P4DTI with the old TeamShare API by following <a
href="#section-2.1">section 2.1</a>. </p></li>
<li><p> Test the P4DTI with the old TeamShare API by following <a
href="#section-2.2">section 2.2</a>. </p></li>
</ol></li>
<li><p> Once you have the P4DTI working with the support TeamTrack,
you're ready to update the API. </p></li>
<li><p> Replace the <code>.C</code> and <code>.h</code> files in the
directory <code>KIT-HOME/code/tsapi/</code> with the new TeamShare
API. </p></li>
<li><p> Check that the P4DTI works with the new API. Follow these
steps:
</p>
<ol>
<li><p> Install the TeamTrack release that's supported by your updated
API. </p></li>
<li><p> Build the P4DTI with the updated TeamShare API by following <a
href="#section-2.1">section 2.1</a>. </p></li>
<li><p> Test the P4DTI with the updated TeamShare API by following <a
href="#section-2.2">section 2.2</a>. </p></li>
</ol></li>
</ol>
<h3><a id="section-2.1" name="section-2.1">2.1. Building the Python interface to TeamTrack</a></h3>
<ol>
<li><p> Run Microsoft Visual C++. </p></li>
<li><p> Choose <code>File > Open Workspace</code> and open the
workspace file <code>KIT-HOME/code/p4dti.dsw</code>. </p></li>
<li><p> Add any new TeamShare API source files to the <code>tsapi</code>
project. </p></li>
<li><p> Make <code>teamtrack</code> the active project and select
<code>Build > Rebuild All</code>. </p></li>
<li><p> If you get compilation errors, you could (a) do your best to fix
them now and report them to Ravenbrook later; or (b) ask Ravenbrook to
help you fix them. </p></li>
</ol>
<h3><a id="section-2.2" name="section-2.2">2.2. Testing the Python
interface to TeamTrack</a></h3>
<p> Here are the preconditions: </p>
<ol>
<li><p> Make sure that you have Python on your computer. If not,
download Python 2.0 from <a
href="http://www.ravenbrook.com/project/p4dti/import/2000-10-18/Python-2.0/BeOpen-Python-2_0.exe">http://www.ravenbrook.com/project/p4dti/import/2000-10-18/Python-2.0/BeOpen-Python-2_0.exe</a>
and install it. </p></li>
<li><p> Download the Python unit test framework from <a
href="http://download.sourceforge.net/pyunit/pyunit-1.3.1.zip">http://download.sourceforge.net/pyunit/pyunit-1.3.1.zip</a>
and install it by putting the file <code>unittest.py</code> in your
Python library directory (this will be something like <code>C:\Program
Files\Python20\Lib\</code>). </p></li>
<li><p> Set up a sample TeamTrack database. </p></li>
<li><p> Create a test configuration. First, copy
<code>KIT-HOME/code/replicator/config.py</code> to
<code>KIT-HOME/test/test_<i>HOSTNAME</i>.py</code> (where
<code><i>HOSTNAME</i></code> is the least significant part of the
hostname of your testing machine. (On Windows NT, run the
<code>hostname</code> command and lowercase the output.) </p></li>
<li><p> Second, edit the configuration so that it has appropriate values
for <code>teamtrack_server</code>, <code>teamtrack_user</code> and
<code>teamtrack_password</code>. Follow the instructions in the <a
href="../../manual/ag/index.html#section-5.1"><cite>P4DTI
Administrator's Guide</cite>, section 5.1</a>, if in doubt. </p></li>
</ol>
<p> And here are the test steps. </p>
<ol>
<li><p> Open a command window, change directory to
<code>KIT-HOME/test</code>, run the command <code>python
test_teamtrack.py</code>. </p></li>
<li><p> If you get errors from the TeamShare API, run the test in the
debugger. </p></li>
</ol>
<h2><a id="section-3" name="section-3">3. Testing the P4DTI</a></h2>
<p> To test the P4DTI itself with the updated TeamShare API: </p>
<ol>
<li><p> Download the latest release of Perforce from <a
href="http://www.perforce.com/perforce/loadprog.html">http://www.perforce.com/perforce/loadprog.html</a>
and install it. (If you need extra licences for testing, contact <a
href="http://www.perforce.com/perforce/support.html#contact">Perforce
support</a> and explain what you're doing.) </p></li>
<li><p> Follow <a href="#section-2">section 2</a> until the updated API
passes the basic tests. </p></li>
<li><p> Follow the instructions in the <cite>P4DTI Administrator's
Guide</cite> [<a title="Perforce Defect Tracking Integration
Administrator's Guide" href="../../manual/ag/index.html">RB
2000-08-10a</a>] to configure and run the P4DTI. (But use the directory
<code>KIT-HOME/code/replicator/</code> where the Administrator's Guide
refers to the "installation directory", for example when editing
<code>config.py</code>.) </p></li>
<li><p> Take an issue through its lifecycle, follow the steps in the
<cite>P4DTI User's Guide</cite> [<a title="Perforce Defect Tracking
Integration User's Guide" href="../../manual/ug/index.html">RB
2000-08-10b</a>] to update and fix the issue. </p></li>
</ol>
<h2><a id="section-A" name="section-A">A. References</a></h2>
<table>
<tr valign="top">
<td>[<a id="ref-RB-2000-08-10a" name="ref-RB-2000-08-10a" href="../../manual/ag/index.html">RB 2000-08-10a</a>]</td>
<td>
"Perforce Defect Tracking Integration Administrator's Guide";
<a href="mailto:rb@ravenbrook.com">Richard Brooksby</a>;
<a href="http://www.ravenbrook.com/">Ravenbrook Limited</a>;
2000-08-10.
</td>
</tr>
<tr valign="top">
<td>[<a id="ref-RB-2000-08-10b" name="ref-RB-2000-08-10b" href="../../manual/ug/index.html">RB 2000-08-10b</a>]</td>
<td>
"Perforce Defect Tracking Integration User's Guide";
<a href="mailto:rb@ravenbrook.com">Richard Brooksby</a>;
<a href="http://www.ravenbrook.com/">Ravenbrook Limited</a>;
2000-08-10.
</td>
</tr>
</table>
<h2><a id="section-B" name="section-B">B. Document History</a></h2>
<table>
<tr valign="top">
<td>2001-06-25</td>
<td><a href="mailto:gdr@ravenbrook.com">GDR</a></td>
<td>Created.</td>
</tr>
</table>
<hr />
<p><small>Copyright © 2001 Ravenbrook Limited. This document is provided "as is", without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this document. You may make and distribute verbatim copies of this document provided that you do not charge a fee for this document or for its distribution.</small></p>
<div align="center">
<p><code>$Id: //info.ravenbrook.com/project/p4dti/version/2.0/procedure/teamshare-api-update/index.html#2 $</code></p>
<p>
<a href="http://www.ravenbrook.com/">Ravenbrook</a> /
<a href="http://www.ravenbrook.com/project/">Projects</a> /
<a href="http://www.ravenbrook.com/project/p4dti/">Perforce Defect Tracking Integration</a> /
<a href="../../index.html">Version 2.0 Product Sources</a> /
<a href="../index.html">Procedures</a>
</p>
</div>
</body>
</html>