<?xml version="1.0" encoding="ISO-8859-1"?>
<document url="http://castor.org/tutorial/how-to-run-xml-ctf-suite.xml">
  <properties>
    <title>How to run Castor XML's CTF suite</title>
    <abstract>
       General information about running Castor XML's CTF suite
    </abstract>
    <status>Final</status>
  </properties>
  <body>
    <title>How to run Castor XML's CTF suite</title>
    <header>
    </header>
    
	<section title="Overview">

        <p>Castor XML has a JUnit test suite that is used to perform various functional 
           and regression tests, to give developers/committers some reassurance when 
           changing the codebase.</p>

    </section>
    
    <section title="Intended Audience">

        <p>Anyone who wants to run the CTF test suite. This document outlines the basic 
           steps to get people unfamiliar with this area started.</p>

        <p>Our example describes the use of command-line tools for a UNIX system.</p>
        
    </section>
    
    <section title="Prerequisites">

        <p>Anybody wishing to run the CTF test suite should have access to the 
           source code of Castor. This can be obtained in one of the following 
           ways:</p>

        <ul>
            <li>Download the sources distribution from the 
                <a href="download.html">download page</a></li>
            
            <li>download the latest snapshot from SVN from (see links on the bottom 
                left corner): <a href="http://svn.castor.codehaus.org/viewrep/castor/castor">here</a></li>
            <li>Check out the latest code from SVN into your prefered developement 
                environment. For instructions on this task, take a look
                <a href="scm.html">here</a></li>
        </ul>
        
        <note>The CTF currently requires the Sun JDK (or SDK) to execute,
           although it may be possible to execute fine with GNU gcj or with JRockit. The
           CTF will not work if you are using only a JRE. This is because the CTF uses
           the Sun Java compiler API to compile code as needed for Source Generator and
           Marshaling Framework tests. The CTF code is written to allow easy extension
           for additional compiler frameworks, so if you use a compiler or runtime that
           is not supported, you should be able to easily add support for a new framework.
           If you want to do this, contact Castor committors for assistance and direction
           and they'll set you on the right course.</note>
    </section>

    <section title="Steps">

        <p>Once you have obtained the Castor sources in one of the ways highlighted above,
           here is how to proceed. In general, more information about how to 
           execute the CTF test suite and its internals can be found 
           <a href="test-framework.html">here</a>.</p>


        <p>From a command line (e.g a shell), please execute the following
           commands to run the complete Castor XML master test suite (default suite).</p>
           
        <code-panel>
> cd &lt;castor-root&gt;
> mvn install
> cd &lt;castor-root&gt;/xmlctf
> mvn clean verify</code-panel>

        <p>
           It is also possible to execute just a subset of the master test suite, simply by 
           specifying <tt>castor.xmlctf.root</tt> property. For example:
        </p>

        <code-panel>
> mvn clean verify -Dcastor.root.test=MasterTestSuite/mapping</code-panel>

        <p>
           The above command will effect in running only the subset of tests located under the 
           <tt>MasterTestSuite/mapping</tt> directory.
        </p>

    </section>
        
    <section title="References">

        <ul>
            <li><a href="test-framework.html">The testing framework</a></li>
            <li><a href="scm.html">Access to SVN</a></li>
        </ul>
    
        
    </section>


    </body>
</document>