XSLT Tests: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
m (→‎Running the tests: made consistent with cvs->svn changes)
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
= Getting the XSLT test suite =
= Getting the XSLT test suite =


# set CVSROOT to <code>:pserver:anoncvs@cvs.apache.org:/home/cvspublic</code>
# Pick a directory under which the tests will live.  From now on it will be referred to as <code>$TESTHOME</code>.  Note that the only thing created in <code>$TESTHOME</code> will be an <code>xalan-test/</code> directory.
# Check out the <code>xml-xalan/test</code> module.
# Use the SVN repository base URL http://svn.apache.org/repos/asf/
# Check out the trunk of the <code>xalan/test</code> module.


For example, on a Unix you might do
For example, on a Unix system you might do


   env CVSROOT=:pserver:anoncvs@cvs.apache.org:/home/cvspublic cvs co xml-xalan/test
   cd ~
  svn co http://svn.apache.org/repos/asf/xalan/test/trunk xalan-test


= Running the tests =
= Running the tests =


WARNING: these tests have only been checked in SeamonkeyThey may well not work in Firefox.
<ol>
 
<li> [http://developer.mozilla.org/en/docs/Configuring_Build_Options#Choose_an_Application Compile Seamonkey with the <code>--enable-tests</code> option]This is needed to run the tests until the user interface is ported to Firefox.
# In the <code>tests</code> directory in the Xalan tree you pulled (this is the directory that has <code>conf</code> and <code>conf-gold</code> as subdirectories) run the script found at <code>content/xslt/tests/buster/helper/generate-rdf.pl</code> in your source tree.  This will generate a file called <code>xalan.rdf</code> in the Xalan <code>tests</code> directory.
</li>
# Start a build that does NOT have the changes being tested in it.  Go to the Tools > Web Development > Xalan Tests menu option.
<li>
# Click the "Browse" button and browse for the <code>xalan.rdf</code> file that you created in step 1.
From now on, we will refer to <code>${TESTHOME}/xalan-test/tests</code> (this is the directory that has <code>conf</code> and <code>conf-gold</code> as subdirectories) as <code>$TESTDIR</code>.  We will refer to your Mozilla source directory as <code>$MOZDIR</code>.
# Select the "conf" item in the tree at the bottom of the Xalan Tests dialog.
</li>
# Click "run checked tests"
<li> Go to <code>$TESTDIR</code> and run <code>$MOZDIR/content/xslt/tests/buster/helper/generate-rdf.pl</code>.  This will generate a file called <code>xalan.rdf</code> in <code>$TESTDIR</code>. Steps 1-3 might look something like:
# Wait until the test completes. Then repeat steps 2-5 in a build that DOES have the changes being tested in it and compare the results.
<pre>cd ~/xalan-test/tests
perl ~/mozilla/debug/mozilla/content/xslt/tests/buster/helper/generate-rdf.pl
</pre>
</li>
<li>
Start a build that does NOT have the changes being tested in it.  Go to the Tools > Web Development > Xalan Tests menu option.  This opens a "Xalan testcase harness" window.  Resize this window to be big enough to show at least three lines of the tree at the bottom of the window.
</li>
<li>
Click the "Browse" button and browse for the <code>xalan.rdf</code> file that you created in step 3.
</li>
<li>
Select the "conf" item in the tree at the bottom of the "Xalan testcase
harness" window.
</li>
<li>Click the button labeled "run checked tests"</li>
<li>Wait until the test completes.</li>
<li>Go to File > Save Results and save the results to a file of your choice.</li>
<li>Repeat step 4 with a build that DOES have the changes being tested in it.</li>
<li>Go to File > Import results and import the results you saved in step 8.</li>
<li>Repeat steps 5-8.</li>
<li>Compare the results -- the "Success" column will have the results with the changes being tested, while the "Previously" column is the baseline.</li>
</ol>

Latest revision as of 04:31, 10 March 2007

Getting the XSLT test suite

  1. Pick a directory under which the tests will live. From now on it will be referred to as $TESTHOME. Note that the only thing created in $TESTHOME will be an xalan-test/ directory.
  2. Use the SVN repository base URL http://svn.apache.org/repos/asf/
  3. Check out the trunk of the xalan/test module.

For example, on a Unix system you might do

 cd ~
 svn co http://svn.apache.org/repos/asf/xalan/test/trunk xalan-test

Running the tests

  1. Compile Seamonkey with the --enable-tests option. This is needed to run the tests until the user interface is ported to Firefox.
  2. From now on, we will refer to ${TESTHOME}/xalan-test/tests (this is the directory that has conf and conf-gold as subdirectories) as $TESTDIR. We will refer to your Mozilla source directory as $MOZDIR.
  3. Go to $TESTDIR and run $MOZDIR/content/xslt/tests/buster/helper/generate-rdf.pl. This will generate a file called xalan.rdf in $TESTDIR. Steps 1-3 might look something like:
    cd ~/xalan-test/tests
    perl ~/mozilla/debug/mozilla/content/xslt/tests/buster/helper/generate-rdf.pl
    
  4. Start a build that does NOT have the changes being tested in it. Go to the Tools > Web Development > Xalan Tests menu option. This opens a "Xalan testcase harness" window. Resize this window to be big enough to show at least three lines of the tree at the bottom of the window.
  5. Click the "Browse" button and browse for the xalan.rdf file that you created in step 3.
  6. Select the "conf" item in the tree at the bottom of the "Xalan testcase harness" window.
  7. Click the button labeled "run checked tests"
  8. Wait until the test completes.
  9. Go to File > Save Results and save the results to a file of your choice.
  10. Repeat step 4 with a build that DOES have the changes being tested in it.
  11. Go to File > Import results and import the results you saved in step 8.
  12. Repeat steps 5-8.
  13. Compare the results -- the "Success" column will have the results with the changes being tested, while the "Previously" column is the baseline.