You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2005/09/11 13:23:56 UTC

svn commit: r280105 - in /db/torque/site/xdocs: navigation.xml subversion.xml tests.xml

Author: tfischer
Date: Sun Sep 11 04:23:51 2005
New Revision: 280105

URL: http://svn.apache.org/viewcvs?rev=280105&view=rev
Log:
- added a page explaining how to use the test project
- added the test module to the subversion page and removed the runtimetest part
- some small corrections on the subversion page

Added:
    db/torque/site/xdocs/tests.xml
Modified:
    db/torque/site/xdocs/navigation.xml
    db/torque/site/xdocs/subversion.xml

Modified: db/torque/site/xdocs/navigation.xml
URL: http://svn.apache.org/viewcvs/db/torque/site/xdocs/navigation.xml?rev=280105&r1=280104&r2=280105&view=diff
==============================================================================
--- db/torque/site/xdocs/navigation.xml (original)
+++ db/torque/site/xdocs/navigation.xml Sun Sep 11 04:23:51 2005
@@ -41,6 +41,7 @@
       <item name="Generator"             href="/generator/"/>
       <item name="Templates"             href="/templates"/>
       <item name="Maven-Plugin"          href="/maven-plugin/"/>
+      <item name="Test project"          href="/tests.html"/>
     </menu>
 
     <menu name="Releases">

Modified: db/torque/site/xdocs/subversion.xml
URL: http://svn.apache.org/viewcvs/db/torque/site/xdocs/subversion.xml?rev=280105&r1=280104&r2=280105&view=diff
==============================================================================
--- db/torque/site/xdocs/subversion.xml (original)
+++ db/torque/site/xdocs/subversion.xml Sun Sep 11 04:23:51 2005
@@ -17,8 +17,9 @@
 
 <document>
   <properties>
-    <title>Torque</title>
+    <title>Subversion</title>
     <author email="hps@intermeta.de">Henning P. Schmiedehausen</author>
+    <author email="fischer@seitenbau.de">Thomas Fischer</author>
   </properties>
 
   <body>
@@ -65,6 +66,7 @@
        <tr><td>Maven-Plugin</td><td><a href="http://svn.apache.org/viewcvs/db/torque/maven-plugin/trunk/">http://svn.apache.org/repos/asf/db/torque/maven-plugin/trunk/</a></td></tr>
        <tr><td>Site</td>        <td><a href="http://svn.apache.org/viewcvs/db/torque/site/">http://svn.apache.org/repos/asf/db/torque/site/</a></td></tr>
        <tr><td>Common</td>      <td><a href="http://svn.apache.org/viewcvs/db/torque/common/trunk/">http://svn.apache.org/repos/asf/db/torque/common/trunk/</a></td></tr>
+       <tr><td>Test</td>        <td><a href="http://svn.apache.org/viewcvs/db/torque/test/trunk/">http://svn.apache.org/repos/asf/db/torque/test/trunk/</a></td></tr>
       </table>
      </p>
     </subsection>
@@ -92,6 +94,13 @@
       Torque modules!.
      </p>
     </subsection>
+    <subsection name="Test project">
+     <p>
+      The test project is used by Torque developers to test the functionality
+      of Torque. See the <a href="tests.html">test guide</a> for an explanation
+      of how to run the tests.
+     </p>
+    </subsection>
     <subsection name="Site">
      <p>
       The Torque site contains the information global to all Torque
@@ -143,21 +152,8 @@
      <ul>
       <li>build -- Builds all parts of Torque</li>
       <li>install - Builds all parts of Torque and installs the resulting jars and plugins into your local maven repository</li>
-      <li>doc -- Builds the documentation sites for all parts of Torque</li>
+      <li>site -- Builds the documentation sites for all parts of Torque</li>
      </ul>
-    </p>
-   </section>
-
-   <section name="Runtime Test">
-    <p>
-     The <i>runtime</i> module contains the Torque runtime test, which
-     tests all aspects of the runtime, generator and templates. If you
-     want to run this test (executing the runtime:test goal), it must
-     be aware of the locations of the generator and template
-     source. Easiest way to do so is running it from the
-     <i>trunks/runtime</i> module. <br/>
-     If you have a different source layout and want to run the runtime test, you must adjust the <code>torque.generator.home</code> and <code>torque.templates.home</code> properties
-     in the <code>project.properties</code> file inside the <i>runtime</i> module.
     </p>
    </section>
   </body>

Added: db/torque/site/xdocs/tests.xml
URL: http://svn.apache.org/viewcvs/db/torque/site/xdocs/tests.xml?rev=280105&view=auto
==============================================================================
--- db/torque/site/xdocs/tests.xml (added)
+++ db/torque/site/xdocs/tests.xml Sun Sep 11 04:23:51 2005
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2001-2005 The Apache Software Foundation.
+
+ Licensed under the Apache License, Version 2.0 (the "License")
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<document>
+  <properties>
+    <title>Test project</title>
+    <author email="fischer@seitenbau.de">Thomas Fischer</author>
+  </properties>
+
+  <body>
+    <section name="The Torque test project">
+      <p>
+        The test project tests all aspects of the Torque main distribution
+        and checks whether the different parts of Torque (runtime, generator, 
+        templates, maven-plugin) work together. The test project is almost
+        a normal Torque project, with the following differences:
+        <ul>
+          <li>
+            It contains additional maven goals to run the tests
+          </li>
+          <li>
+            Instead of directly using the schema files from the 
+            <i>src/schema</i> directory, the schema files are copied to the 
+            directory <i>target/schema</i>, and some tokens are replaced during 
+            copying. 
+            For the tests, the schema files from <i>target/schema</i> with the 
+            replaced tokens are used.
+          </li>
+          <li>
+            The test project POM extends the POM of one of the test profiles
+            (which in turn extend the POM of the Torque runtime in order to 
+            include all dependencies of the runtime). To choose the parent POM
+            out of the many profiles, the maven parameter 
+            <code>torque.test.profile</code> must be set to the name of the 
+            directory containing the chosen profile (see below for instructions
+            and an example).
+          </li>
+        </ul>
+      </p>
+
+      <subsection name="Running the test project">
+        <p>
+          In order to run the test project, the following procedure is 
+          recommended:
+          <ul>
+            <li>
+              Check out the trunks module from the svn repository
+            </li>
+            <li>
+              Change into the directory <i>trunks/test/profile</i>, and change
+              one of the profiles to match the database which you want to test 
+              against. The file <i>project.xml</i> contains the location of
+              the jdbc driver (you might need to install the driver manually
+              to the local maven repository, see the Tutorial on how to do 
+              this). The file <i>project.properties</i> contains the 
+              settings for the maven plugin (and thus the generator),
+              and the file <i>Torque.properties</i> contains the settings for 
+              the runtime.  
+            </li>
+            <li>
+              Change into the directory <i>trunks/test/test-project</i>, 
+              and run the command 
+              <code>maven -Dtorque.test.profile=${profile}</code>
+              to run the test, replacing the variable 
+              <code>${profile}</code> with the name of your chosen profile
+              directory. For example, if you want to test against mysql, run
+              <code>maven -Dtorque.test.profile=mysql</code>
+              <br />
+              If you want to build all Torque modules from source, install them 
+              in your local maven repository, and run the test using the newly
+              installed Torque components all in one rush, use the command
+              <code>maven -Dtorque.test.profile=${profile} torque-test:install-run</code>
+            </li>
+          </ul>
+        </p>
+      </subsection>
+
+      <subsection name="Common pitfalls">
+        <p>
+          If maven complains about not being able to load its parent POM, 
+          this is probably due to one of the following:
+          <ul>
+            <li>
+              The maven parameter <code>torque.test.profile</code>
+              is either not set or set to the wrong value. Set it to a valid
+              value, for example by using the command line parameter 
+              <code>-Dmaven.test.profile=mysql</code> when running maven.
+            </li>
+            <li>
+              You have not checked out the whole trunks module. The test project
+              indirectly extends the runtime POM (via the profile POMs) to 
+              include the libary the runtime depends on. Either check out the
+              whole trunks directory, or get the runtime POM from somewhere else
+              and refer to it in the &lt;extend&gt; part of the 
+              profile.
+            </li>
+          </ul>
+        </p>
+      </subsection>
+    </section>
+  </body>
+</document>
+    
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org