1402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<html>
2402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<head>
3402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<title>Instructions</title>
4402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll</head>
6402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll
7402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<body bgcolor="#FFFFFF" text="#000000">
8402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<font size="+2"> Automated Testing of VE Builds</font> 
9402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p>last updated: November 4, 2003</p>
10402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p><font size="+1">Description</font></p>
11402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p>This document describes how to run the Visual Editor JUnit test plugins from the command 
12402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  line. This is the same mechanism used in VE builds.</p>
13402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p>Click <a href="testframework.html">here</a> for a description of the testing 
14402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  framework, and how it can be used outside of the setup described here.</p>
15402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p>If you simply wish to write and run JUnit tests interactively from an Eclipse 
16402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  workbench, try one of the links below:</p>
17402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p><a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/plugins/org.eclipse.jdt.junit/index.html">JUnit 
18402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  Support in Eclipse</a><br>
19402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<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 
20402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  JUnit</a></p>
21402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll
22402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p><font size="+1">Requirements</font></p>
23402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p>1. All test machines must have a java runtime environment (version 1.3.1) installed and added to the path environment variable (see 
24402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <a href="#vm">-vm</a> parameter below).<br>
25402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  2. <a href="http://www.info-zip.org/pub/infozip/UnZip.html">Info-ZIP UnZip</a> 
26402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  version 5.41 or later installed and added to the path.<br>
27402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  3. The Automated Test feature from a
28402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <a href="http|//download.eclipse.org/tools/vep/downloads/"> VE downloads</a>. 
29402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  This contains the test framework plugins and the JUnit test plugins to run.<br>
30402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  4. The VE-runtime zip file from the same build as the Automated Test feature.<br>
31402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  5. An Eclipse SDK, GEF runtime, and EMF runtime zip files. The URL and build name of the required builds 
32402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  are specified in the build.cfg file included in the Automated Test zip file.</p>
33402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p><font size="+1">Setup</font></p>
34402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p>1. Extract the VE-Automated-Tests-&lt;buildid&gt;.zip. On Window, extract 
35402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  this file close to the root of the drive to prevent some path names from exceeding 
36402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  the 255 character limit. This will create a top-level directory &quot;<b>ve-testing</b>&quot;.<br>
37402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  2. Place the Eclipse SDK, GEF, EMF, and VE runtime zip files in the ve-testing directory. 
38402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  Do not unzip these files. (The test scripts will take care of this)<br>
39402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll</p>
40402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p><font size="+1">Running Tests</font></p>
41402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p>1. cd to the ve-testing directory<br>
42402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  2. Run the following script:</p>
43402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p><b>runtests [-os &lt;operating system&gt;] [-ws &lt;windowing system&gt;] [-arch 
44402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  &lt;architecture&gt;] [-noclean] [&lt;testTarget&gt;][-properties &lt;path&gt;][-vm 
45402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  &lt;path to java executable&gt;]</b></p>
46402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollAll parameters and targets are optional on windows systems. Just running &quot;runtests&quot; 
47402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollwill run <b>ALL</b> tests on Windows, installing a clean Eclipse and VE SDK between 
48402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molleach test target. On *nix systems, the os, ws and arch parameters must be specified. 
49402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<br>
50402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<br>
51402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollTest results are placed in the ve-testing/results directory in xml and html format.<br>
52402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p><font size="+1"><a name="vm"></a>Parameters</font></p>
53402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<table width="90%" border="1">
54402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
55402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>Parameter</td>
56402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>Description</td>
57402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
58402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
59402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>-os &lt;operating system&gt;</td>
60402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>The OS the tests are being run on. One of: aix, hpux, linux, qnx, solaris, 
61402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll      win32. <b>Default win32</b></td>
62402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
63402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
64402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>-ws &lt;windowing system&gt;</td>
65402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>The windowing system the tests are being run on. One of: motif, gtk, photon, 
66402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll      win32. <b>Default win32</b></td>
67402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
68402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
69402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>-arch &lt;architecture&gt;</td>
70402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>The architecture the tests are being run on. One of: ppc, PA_RISC, x86, 
71402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll      sparc. <b>Default x86</b></td>
72402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
73402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
74402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>-noclean</td>
75402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>Run tests without installing an Eclipse and GEF SDK and tests between 
76402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll      test targets. Default is to re-install these between test targets.</td>
77402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
78402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
79402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>-properties</td>
80402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>Used to reference a properties file containing additional Ant properties 
81402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll      used in running tests.Can be used to pass additional vm arguments to the 
82402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll      Java virtual machine running the tests by adding the entry &quot;extraVMargs=&lt;the 
83402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll      args to pass to the vm&gt;&quot; to the specified properties file.</td>
84402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
85402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr>
86402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>-vm</td>
87402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>The full path to the java executable with which to run the tests. Use 
88402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll      this to specify a specific virtual machine with which to run the tests. 
89402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll      For example, &quot;-vm c:\sun131\jre\bin\java&quot;. Default set to &quot;java&quot; 
90402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll      (i.e. java executable on system path). </td>
91402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
92402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll</table>
93402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  
94402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p><font size="+1">Test Targets</font></p>
95402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p>Specifies which ant target to run in the main test.xml. Typically this corresponds 
96402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  to a test project's tests. If you do not specify a test target then the <b>all</b> 
97402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  test target is run.</p>
98402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll
99402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<table width="90%" border="1">
100402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
101402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>all</td>
102402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>Runs all the targets below.</td>
103402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
104402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
105402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>ve</td>
106402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>Runs the JUnit plug-in tests in org.eclipse.ve.tests</td>
107402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
108402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
109402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>jem</td>
110402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>Runs the JUnit plug-in tests in org.eclipse.jem.tests</td>
111402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
112402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
113402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>genHtml</td>
114402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>Converts xml test results in the &quot;ve-testing\results&quot; directory 
115402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll      to html.</td>
116402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
117402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll</table>
118402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p>&nbsp;</p>
119402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p><font size="+1"><a name="appendixb"></a>Appendix A- Supported os, ws, and arch 
120402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  value combinations</font></p>
121402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<p>The following table contains the values that can be used with the -os, -ws, 
122402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  and -arch switches.</p>
123402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<table width="75%" border="1">
124402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
125402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>Operating System (os)</td>
126402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>Windowing System (ws)</td>
127402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>Architecture (arch)</td>
128402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
129402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
130402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>aix</td>
131402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>motif</td>
132402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>ppc</td>
133402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
134402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
135402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>hpux</td>
136402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>motif</td>
137402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>PA_RISC</td>
138402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
139402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
140402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>linux</td>
141402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>gtk</td>
142402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>x86</td>
143402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
144402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
145402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>linux</td>
146402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>motif</td>
147402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>x86</td>
148402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
149402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
150402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td height="24">qnx</td>
151402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td height="24">photon</td>
152402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td height="24">x86</td>
153402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
154402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
155402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>solaris</td>
156402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>motif</td>
157402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>sparc</td>
158402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
159402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  <tr> 
160402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>win32</td>
161402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>win32</td>
162402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll    <td>x86</td>
163402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll  </tr>
164402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll</table>
165402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll</body>
166402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll</html>