readme.html
1 <html>
2 <head>
3 <title>Instructions</title>
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5 </head>
6
7 <body bgcolor="#FFFFFF" text="#000000">
8 <font size="+2"> Automated Testing of VE Builds</font>
9 <p>last updated: November 4, 2003</p>
10 <p><font size="+1">Description</font></p>
11 <p>This document describes how to run the Visual Editor JUnit test plugins from the command
12 line. This is the same mechanism used in VE builds.</p>
13 <p>Click <a href="testframework.html">here</a> for a description of the testing
14 framework, and how it can be used outside of the setup described here.</p>
15 <p>If you simply wish to write and run JUnit tests interactively from an Eclipse
16 workbench, try one of the links below:</p>
17 <p><a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/plugins/org.eclipse.jdt.junit/index.html">JUnit
18 Support in Eclipse</a><br>
19 <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
20 JUnit</a></p>
21
22 <p><font size="+1">Requirements</font></p>
23 <p>1. All test machines must have a java runtime environment (version 1.3.1) installed and added to the path environment variable (see
24 <a href="#vm">-vm</a> parameter below).<br>
25 2. <a href="http://www.info-zip.org/pub/infozip/UnZip.html">Info-ZIP UnZip</a>
26 version 5.41 or later installed and added to the path.<br>
27 3. The Automated Test feature from a
28 <a href="http|//download.eclipse.org/tools/vep/downloads/"> VE downloads</a>.
29 This contains the test framework plugins and the JUnit test plugins to run.<br>
30 4. The VE-runtime zip file from the same build as the Automated Test feature.<br>
31 5. An Eclipse SDK, GEF runtime, and EMF runtime zip files. The URL and build name of the required builds
32 are specified in the build.cfg file included in the Automated Test zip file.</p>
33 <p><font size="+1">Setup</font></p>
34 <p>1. Extract the VE-Automated-Tests-<buildid>.zip. On Window, extract
35 this file close to the root of the drive to prevent some path names from exceeding
36 the 255 character limit. This will create a top-level directory "<b>ve-testing</b>".<br>
37 2. Place the Eclipse SDK, GEF, EMF, and VE runtime zip files in the ve-testing directory.
38 Do not unzip these files. (The test scripts will take care of this)<br>
39 </p>
40 <p><font size="+1">Running Tests</font></p>
41 <p>1. cd to the ve-testing directory<br>
42 2. Run the following script:</p>
43 <p><b>runtests [-os <operating system>] [-ws <windowing system>] [-arch
44 <architecture>] [-noclean] [<testTarget>][-properties <path>][-vm
45 <path to java executable>]</b></p>
46 All parameters and targets are optional on windows systems. Just running "runtests"
47 will run <b>ALL</b> tests on Windows, installing a clean Eclipse and VE SDK between
48 each test target. On *nix systems, the os, ws and arch parameters must be specified.
49 <br>
50 <br>
51 Test results are placed in the ve-testing/results directory in xml and html format.<br>
52 <p><font size="+1"><a name="vm"></a>Parameters</font></p>
53 <table width="90%" border="1">
54 <tr>
55 <td>Parameter</td>
56 <td>Description</td>
57 </tr>
58 <tr>
59 <td>-os <operating system></td>
60 <td>The OS the tests are being run on. One of: aix, hpux, linux, qnx, solaris,
61 win32. <b>Default win32</b></td>
62 </tr>
63 <tr>
64 <td>-ws <windowing system></td>
65 <td>The windowing system the tests are being run on. One of: motif, gtk, photon,
66 win32. <b>Default win32</b></td>
67 </tr>
68 <tr>
69 <td>-arch <architecture></td>
70 <td>The architecture the tests are being run on. One of: ppc, PA_RISC, x86,
71 sparc. <b>Default x86</b></td>
72 </tr>
73 <tr>
74 <td>-noclean</td>
75 <td>Run tests without installing an Eclipse and GEF SDK and tests between
76 test targets. Default is to re-install these between test targets.</td>
77 </tr>
78 <tr>
79 <td>-properties</td>
80 <td>Used to reference a properties file containing additional Ant properties
81 used in running tests.Can be used to pass additional vm arguments to the
82 Java virtual machine running the tests by adding the entry "extraVMargs=<the
83 args to pass to the vm>" to the specified properties file.</td>
84 </tr>
85 <tr>
86 <td>-vm</td>
87 <td>The full path to the java executable with which to run the tests. Use
88 this to specify a specific virtual machine with which to run the tests.
89 For example, "-vm c:\sun131\jre\bin\java". Default set to "java"
90 (i.e. java executable on system path). </td>
91 </tr>
92 </table>
93
94 <p><font size="+1">Test Targets</font></p>
95 <p>Specifies which ant target to run in the main test.xml. Typically this corresponds
96 to a test project's tests. If you do not specify a test target then the <b>all</b>
97 test target is run.</p>
98
99 <table width="90%" border="1">
100 <tr>
101 <td>all</td>
102 <td>Runs all the targets below.</td>
103 </tr>
104 <tr>
105 <td>ve</td>
106 <td>Runs the JUnit plug-in tests in org.eclipse.ve.tests</td>
107 </tr>
108 <tr>
109 <td>jem</td>
110 <td>Runs the JUnit plug-in tests in org.eclipse.jem.tests</td>
111 </tr>
112 <tr>
113 <td>genHtml</td>
114 <td>Converts xml test results in the "ve-testing\results" directory
115 to html.</td>
116 </tr>
117 </table>
118 <p> </p>
119 <p><font size="+1"><a name="appendixb"></a>Appendix A- Supported os, ws, and arch
120 value combinations</font></p>
121 <p>The following table contains the values that can be used with the -os, -ws,
122 and -arch switches.</p>
123 <table width="75%" border="1">
124 <tr>
125 <td>Operating System (os)</td>
126 <td>Windowing System (ws)</td>
127 <td>Architecture (arch)</td>
128 </tr>
129 <tr>
130 <td>aix</td>
131 <td>motif</td>
132 <td>ppc</td>
133 </tr>
134 <tr>
135 <td>hpux</td>
136 <td>motif</td>
137 <td>PA_RISC</td>
138 </tr>
139 <tr>
140 <td>linux</td>
141 <td>gtk</td>
142 <td>x86</td>
143 </tr>
144 <tr>
145 <td>linux</td>
146 <td>motif</td>
147 <td>x86</td>
148 </tr>
149 <tr>
150 <td height="24">qnx</td>
151 <td height="24">photon</td>
152 <td height="24">x86</td>
153 </tr>
154 <tr>
155 <td>solaris</td>
156 <td>motif</td>
157 <td>sparc</td>
158 </tr>
159 <tr>
160 <td>win32</td>
161 <td>win32</td>
162 <td>x86</td>
163 </tr>
164 </table>
165 </body>
166 </html>