<html>
<head>
<title>Instructions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<font size="+2"> Automated Testing of VE Builds</font> 
<p>last updated: November 4, 2003</p>
<p><font size="+1">Description</font></p>
<p>This document describes how to run the Visual Editor JUnit test plugins from the command 
  line. This is the same mechanism used in VE builds.</p>
<p>Click <a href="testframework.html">here</a> for a description of the testing 
  framework, and how it can be used outside of the setup described here.</p>
<p>If you simply wish to write and run JUnit tests interactively from an Eclipse 
  workbench, try one of the links below:</p>
<p><a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/plugins/org.eclipse.jdt.junit/index.html">JUnit 
  Support in Eclipse</a><br>
<a href="http://dev.eclipse.org:8080/help/content/help:/org.eclipse.jdt.doc.user/tasks/tasks-207.htm?resultof=%6a%75%6e%69%74%20&toc=%2Forg.eclipse.jdt.doc.user%2Ftoc.xml">Using 
  JUnit</a></p>

<p><font size="+1">Requirements</font></p>
<p>1. All test machines must have a java runtime environment (version 1.3.1) installed and added to the path environment variable (see 
  <a href="#vm">-vm</a> parameter below).<br>
  2. <a href="http://www.info-zip.org/pub/infozip/UnZip.html">Info-ZIP UnZip</a> 
  version 5.41 or later installed and added to the path.<br>
  3. The Automated Test feature from a
  <a href="http|//download.eclipse.org/tools/vep/downloads/"> VE downloads</a>. 
  This contains the test framework plugins and the JUnit test plugins to run.<br>
  4. The VE-runtime zip file from the same build as the Automated Test feature.<br>
  5. An Eclipse SDK, GEF runtime, and EMF runtime zip files. The URL and build name of the required builds 
  are specified in the build.cfg file included in the Automated Test zip file.</p>
<p><font size="+1">Setup</font></p>
<p>1. Extract the VE-Automated-Tests-&lt;buildid&gt;.zip. On Window, extract 
  this file close to the root of the drive to prevent some path names from exceeding 
  the 255 character limit. This will create a top-level directory &quot;<b>ve-testing</b>&quot;.<br>
  2. Place the Eclipse SDK, GEF, EMF, and VE runtime zip files in the ve-testing directory. 
  Do not unzip these files. (The test scripts will take care of this)<br>
</p>
<p><font size="+1">Running Tests</font></p>
<p>1. cd to the ve-testing directory<br>
  2. Run the following script:</p>
<p><b>runtests [-os &lt;operating system&gt;] [-ws &lt;windowing system&gt;] [-arch 
  &lt;architecture&gt;] [-noclean] [&lt;testTarget&gt;][-properties &lt;path&gt;][-vm 
  &lt;path to java executable&gt;]</b></p>
All parameters and targets are optional on windows systems. Just running &quot;runtests&quot; 
will run <b>ALL</b> tests on Windows, installing a clean Eclipse and VE SDK between 
each test target. On *nix systems, the os, ws and arch parameters must be specified. 
<br>
<br>
Test results are placed in the ve-testing/results directory in xml and html format.<br>
<p><font size="+1"><a name="vm"></a>Parameters</font></p>
<table width="90%" border="1">
  <tr> 
    <td>Parameter</td>
    <td>Description</td>
  </tr>
  <tr> 
    <td>-os &lt;operating system&gt;</td>
    <td>The OS the tests are being run on. One of: aix, hpux, linux, qnx, solaris, 
      win32. <b>Default win32</b></td>
  </tr>
  <tr> 
    <td>-ws &lt;windowing system&gt;</td>
    <td>The windowing system the tests are being run on. One of: motif, gtk, photon, 
      win32. <b>Default win32</b></td>
  </tr>
  <tr> 
    <td>-arch &lt;architecture&gt;</td>
    <td>The architecture the tests are being run on. One of: ppc, PA_RISC, x86, 
      sparc. <b>Default x86</b></td>
  </tr>
  <tr> 
    <td>-noclean</td>
    <td>Run tests without installing an Eclipse and GEF SDK and tests between 
      test targets. Default is to re-install these between test targets.</td>
  </tr>
  <tr> 
    <td>-properties</td>
    <td>Used to reference a properties file containing additional Ant properties 
      used in running tests.Can be used to pass additional vm arguments to the 
      Java virtual machine running the tests by adding the entry &quot;extraVMargs=&lt;the 
      args to pass to the vm&gt;&quot; to the specified properties file.</td>
  </tr>
  <tr>
    <td>-vm</td>
    <td>The full path to the java executable with which to run the tests. Use 
      this to specify a specific virtual machine with which to run the tests. 
      For example, &quot;-vm c:\sun131\jre\bin\java&quot;. Default set to &quot;java&quot; 
      (i.e. java executable on system path). </td>
  </tr>
</table>
  
<p><font size="+1">Test Targets</font></p>
<p>Specifies which ant target to run in the main test.xml. Typically this corresponds 
  to a test project's tests. If you do not specify a test target then the <b>all</b> 
  test target is run.</p>

<table width="90%" border="1">
  <tr> 
    <td>all</td>
    <td>Runs all the targets below.</td>
  </tr>
  <tr> 
    <td>ve</td>
    <td>Runs the JUnit plug-in tests in org.eclipse.ve.tests</td>
  </tr>
  <tr> 
    <td>jem</td>
    <td>Runs the JUnit plug-in tests in org.eclipse.jem.tests</td>
  </tr>
  <tr> 
    <td>genHtml</td>
    <td>Converts xml test results in the &quot;ve-testing\results&quot; directory 
      to html.</td>
  </tr>
</table>
<p>&nbsp;</p>
<p><font size="+1"><a name="appendixb"></a>Appendix A- Supported os, ws, and arch 
  value combinations</font></p>
<p>The following table contains the values that can be used with the -os, -ws, 
  and -arch switches.</p>
<table width="75%" border="1">
  <tr> 
    <td>Operating System (os)</td>
    <td>Windowing System (ws)</td>
    <td>Architecture (arch)</td>
  </tr>
  <tr> 
    <td>aix</td>
    <td>motif</td>
    <td>ppc</td>
  </tr>
  <tr> 
    <td>hpux</td>
    <td>motif</td>
    <td>PA_RISC</td>
  </tr>
  <tr> 
    <td>linux</td>
    <td>gtk</td>
    <td>x86</td>
  </tr>
  <tr> 
    <td>linux</td>
    <td>motif</td>
    <td>x86</td>
  </tr>
  <tr> 
    <td height="24">qnx</td>
    <td height="24">photon</td>
    <td height="24">x86</td>
  </tr>
  <tr> 
    <td>solaris</td>
    <td>motif</td>
    <td>sparc</td>
  </tr>
  <tr> 
    <td>win32</td>
    <td>win32</td>
    <td>x86</td>
  </tr>
</table>
</body>
</html>