XSLT Tests: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
= Getting the XSLT test suite =
= Getting the XSLT test suite =


# Pick a directory under which the tests will live.  From now on it will be referred to as <code>$TESTDIR</code>.  Note that the only thing created in <code>$TESTDIR</code> will be an <code>xml-xalan/</code> directory.
# set CVSROOT to <code>:pserver:anoncvs@cvs.apache.org:/home/cvspublic</code>
# set CVSROOT to <code>:pserver:anoncvs@cvs.apache.org:/home/cvspublic</code>
# Check out the <code>xml-xalan/test</code> module.
# Check out the <code>xml-xalan/test</code> module.


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


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


= Running the tests =
= Running the tests =


WARNING: these tests have only been checked in Seamonkey.  They may well not work in Firefox.
# [http://developer.mozilla.org/en/docs/Configuring_Build_Options#Choose_an_Application Compile Seamonkey]This is needed to run the tests until the user interface is ported to Firefox.
 
# In <code>${TESTDIR}/xml-xalan/test/tests</code> (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 Mozilla source tree.  This will generate a file called <code>xalan.rdf</code> in the Xalan <code>tests</code> directory.
# 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.
# 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.
# Start a build that does NOT have the changes being tested in it.  Go to the Tools > Web Development > Xalan Tests menu option.
# Click the "Browse" button and browse for the <code>xalan.rdf</code> file that you created in step 2.
# Click the "Browse" button and browse for the <code>xalan.rdf</code> file that you created in step 1.
# Select the "conf" item in the tree at the bottom of the "Xalan testcase harness" window.
# Select the "conf" item in the tree at the bottom of the Xalan Tests dialog.
# Click the button labeled "run checked tests"
# Click "run checked tests"
# Wait until the test completes.
# Wait until the test completes.
# Go to File > Save Results and save the results.
# Go to File > Save Results and save the results to a file of your choice.
# Repeat steps 2-7 in a build that DOES have the changes being tested in it.
# Repeat step 3 with a build that DOES have the changes being tested in it.
# Compare the results.
# Go to File > Import results and import the results you saved in step 8.
# Repeat steps 4-7.
# Compare the results -- the "Success" column will have the results with the changes being tested, while the "Previously" column is the baseline.

Revision as of 20:56, 15 January 2006

Getting the XSLT test suite

  1. Pick a directory under which the tests will live. From now on it will be referred to as $TESTDIR. Note that the only thing created in $TESTDIR will be an xml-xalan/ directory.
  2. set CVSROOT to :pserver:anoncvs@cvs.apache.org:/home/cvspublic
  3. Check out the xml-xalan/test module.

For example, on a Unix system you might do

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

Running the tests

  1. Compile Seamonkey. This is needed to run the tests until the user interface is ported to Firefox.
  2. In ${TESTDIR}/xml-xalan/test/tests (this is the directory that has conf and conf-gold as subdirectories) run the script found at content/xslt/tests/buster/helper/generate-rdf.pl in your Mozilla source tree. This will generate a file called xalan.rdf in the Xalan tests directory.
  3. 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.
  4. Click the "Browse" button and browse for the xalan.rdf file that you created in step 2.
  5. Select the "conf" item in the tree at the bottom of the "Xalan testcase harness" window.
  6. Click the button labeled "run checked tests"
  7. Wait until the test completes.
  8. Go to File > Save Results and save the results to a file of your choice.
  9. Repeat step 3 with a build that DOES have the changes being tested in it.
  10. Go to File > Import results and import the results you saved in step 8.
  11. Repeat steps 4-7.
  12. Compare the results -- the "Success" column will have the results with the changes being tested, while the "Previously" column is the baseline.