curcuru     00/11/01 15:25:30

  Added:       test     apitest.bat APITest.properties contribtest.bat
                        ContribTest.properties README.html runtest.bat
                        traxapitest.bat xalanj1apitest.bat
  Log:
  Readme and batch files to execute Xalan test automation
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/apitest.bat
  
  Index: apitest.bat
  ===================================================================
  @echo off
  @goto start
  @REM  Name:   runtest.bat
  @REM  Author: [EMAIL PROTECTED]
  :usage
  @echo runtest.bat - runs Xalan-J test automation
  @echo.
  @echo Notes/prerequisites: 
  @echo   JAVA_OPTS Will be passed to java.exe or jview.exe
  @echo   EXTRA_CP Will be appended to the classpath
  @echo   END_PKG Will be the subpackage name after org.apache.qetest
  @echo Common args include (from the java file, ignore first two "ERROR" 
lines): 
  @REM Call with illegal arg to force Java code to print usage()
  java -classpath %CLASSPATH%;testxsl.jar;%JARDIR%\testxsl.jar 
org.apache.qetest.xsl.XSLProcessorTestBase -load
  @echo.
  goto done
  @REM ------------------------------------------------------------------------
  
  :start
  @echo %0 beginning...
  @REM must have an option to continue
  if '%1' == '' goto usage
  if '%1' == '-h' goto usage
  if '%1' == '-H' goto usage
  if '%1' == '-?' goto usage
  if '%1' == '-jview' goto setjv
  if '%1' == '-JVIEW' goto setjv
  
  @REM Non-jview: Trickery to guess appropriate location of java.exe program
  if '%JAVA_HOME%' == '' set JAVA_EXE=java
  if not '%JAVA_HOME%' == '' set JAVA_EXE=%JAVA_HOME%\bin\java
  set CMDCP=-classpath
  goto dojardir
  
  :setjv
  @REM -jview: Run Microsoft's jview instead of java
  @REM    Note: We assume user has setup environment correctly!
  @REM    shift to get rid of -jview arg; just pass rest of args along
  shift
  set JAVA_EXE=jview
  set CMDCP=/cp
  goto dojardir
  
  :dojardir
  @REM If JARDIR blank, use the existing classpath first, so we pick up 
  @REM    any classes the user may have specified before default ones
  @REM Note that this could cause conflicts if the user only specified 
  @REM    some of the needed jars in the classpath, and then we add separate
  @REM    copies of them later on.
  if '%JARDIR%' == '' echo runtest.bat must have JARDIR set!
  if '%JARDIR%' == '' goto done
  
  @REM If JARDIR set, put those references first then default classpath
  if not '%JARDIR%' == '' set 
TEST_CP=%JARDIR%\testxsl.jar;%JARDIR%\xerces.jar;%JARDIR%\xalan.jar;%JARDIR%\bsf.jar;%JARDIR%\js.jar;%CLASSPATH%
  
  @REM Wrappers use EXTRA_CP to add items to our classpath; if set, append
  if not '%EXTRA_CP%' == '' set TEST_CP=%TEST_CP%;%EXTRA_CP%
  
  @REM Wrappers use END_PKG to switch around the end of the packagename; if not 
set, default it
  if '%END_PKG%' == '' set END_PKG=xsl
  
  @REM If exactly one option passed, assume we run: %JAVA_EXE% TestName -load 
TestName.prop
  @REM this is a convenience for most tests, if they have a same-named prop 
file with them
  if '%2' == '' echo %JAVA_EXE% %JAVA_OPTS% %CMDCP% %TEST_CP% 
org.apache.qetest.%END_PKG%.%1 -load %1.prop
  if '%2' == '' %JAVA_EXE% %JAVA_OPTS% %CMDCP% %TEST_CP% 
org.apache.qetest.%END_PKG%.%1 -load %1.prop
  if '%2' == '' goto done
  
  @REM Otherwise, assume it's a bare classname to run with extra args
  echo %JAVA_EXE% %JAVA_OPTS% %CMDCP% %TEST_CP% org.apache.qetest.%END_PKG%.%1  
%2 %3 %4 %5 %6 %7 %8 %9
  %JAVA_EXE% %JAVA_OPTS% %CMDCP% %TEST_CP% org.apache.qetest.%END_PKG%.%1  %2 
%3 %4 %5 %6 %7 %8 %9
  
  :done
  @echo %0 complete!
  set TEST_CP=
  set JAVA_EXE=
  set CMDCP=
  if '%END_PKG%' == 'xsl' set END_PKG=
  :end
  
  
  
  1.1                  xml-xalan/test/APITest.properties
  
  Index: APITest.properties
  ===================================================================
  # Use various API tests with this properties file
  # Most (but not all) of the same options are shared with ConformanceTest
  
  #---- Choose locations: where to find files, where to log to
  # testDir is where root of test xml/xsl files are
  inputDir=.\\tests\\apitest
  
  # goldDir is where the 'gold' files to check against live
  goldDir=.\\tests\\apitest-gold
  
  # outDir is where we put the actual output files and any logs or error dumps
  outputDir=.\\results-api
  
  # All test output will be saved in this file
  logFile=.\\results-api\\APITest.xml
  
  #---- Choose processor: flavors supported: xalan|trax|other...
  flavor=trax
  
  #---- Choose tests: Filter to only run specific sets of tests
  # Set category to run only the single named directory
  #category=Atrs
  
  # Set excludes to exclude specific tests: foo.xsl;bar.xsl;goo.xsl
  #excludes=lre01.xsl;lre02.xsl
  
  # Run a specific list of files in the named file (see 
XLDirectoryIterator.java)
  #fileList=myListOfFiles.txt
  
  # Uncomment noErrTest to skip running any ./err subdir tests
  #noErrTest=true
  
  #---- Choose output: How much/what kinds of info should we log
  # Choose output: How much logging info is saved: between 0 (very little) and 
99 (lots)
  loggingLevel=50
  
  # If we should save performance-oriented info in the logfile
  perfLogging=true
  
  # Set debug for advanced debugging of the tests themselves
  #debug=true
  
  #---- Choose a liaison: only valid with flavor=xalan
  # XDTM  Xalan-J 1.x/Xerces DTM -default- (uses xerces.jar)
  #liaison=org.apache.xalan.xpath.dtm.DTMLiaison
  # XDOM  Xalan-J 1.x/Xerces DOM (uses xerces.jar)
  #liaison=org.apache.xalan.xpath.xdom.XercesLiaison
  
  
  
  
  1.1                  xml-xalan/test/contribtest.bat
  
  Index: contribtest.bat
  ===================================================================
  @echo off
  @goto start
  @REM  Name:   contribtest.bat
  @REM  Author: [EMAIL PROTECTED]
  
  :start
  set END_PKG=xsl
  @echo Wrapper using 'xsl.ConformanceTest -load ContribTest.properties'
  call runtest.bat ConformanceTest -load ContribTest.properties %1 %2 %3 %4 %5 
%6 %7 %8 %9
  set END_PKG=
  :end
  
  
  
  1.1                  xml-xalan/test/ContribTest.properties
  
  Index: ContribTest.properties
  ===================================================================
  # Use org.apache.qetest.xsl.ConformanceTest test with this properties 
  #   file to iterate over all the 'contrib' tests
  # This file includes descriptive comments for most major options
  # Most other xml-xalan\test tests use similar options
  
  #---- Choose locations: where to find files, where to log to
  # testDir is where root of test xml/xsl files are
  inputDir=.\\tests\\contrib
  
  # goldDir is where the 'gold' files to check against live
  goldDir=.\\tests\\contrib-gold
  
  # outDir is where we put the actual output files and any logs or error dumps
  outputDir=.\\results-contrib
  
  # All test output will be saved in this file
  logFile=.\\results-contrib\\ContribTest.xml
  
  #---- Choose processor: flavors supported: xalan|trax|other...
  flavor=trax
  
  #---- Choose tests: Filter to only run specific sets of tests
  # Set category to run only the single named directory
  #category=Atrs
  
  # Set excludes to exclude specific tests: foo.xsl;bar.xsl;goo.xsl
  #excludes=lre01.xsl;lre02.xsl
  
  # Run a specific list of files in the named file (see 
XLDirectoryIterator.java)
  #fileList=myListOfFiles.txt
  
  # Uncomment noErrTest to skip running any ./err subdir tests
  noErrTest=true
  
  #---- Choose output: How much/what kinds of info should we log
  # Choose output: How much logging info is saved: between 0 (very little) and 
99 (lots)
  loggingLevel=50
  
  # If we should save performance-oriented info in the logfile
  perfLogging=true
  
  # Set debug for advanced debugging of the tests themselves
  #debug=true
  
  #---- Choose a liaison: only valid with flavor=xalan
  # XDTM  Xalan-J 1.x/Xerces DTM -default- (uses xerces.jar)
  #liaison=org.apache.xalan.xpath.dtm.DTMLiaison
  # XDOM  Xalan-J 1.x/Xerces DOM (uses xerces.jar)
  #liaison=org.apache.xalan.xpath.xdom.XercesLiaison
  
  
  
  
  1.1                  xml-xalan/test/README.html
  
  Index: README.html
  ===================================================================
  <html>
    <title>Xalan testing support files</title>
    <body>
      <p>This directory is a repository for test files and test automation for 
Xalan.</p>  
      <dl>
        <dt><b>Program(s) Under Test: </b></dt>
        <dd><a href="http://xml.apache.org/xalan-j"; target="_top">Xalan-J 2.x 
XSLT Processor</a></dd>
        <dd><a href="http://xml.apache.org/xalan"; target="_top">Xalan-J 1.x 
XSLT Processor</a></dd>
        <dd><a href="http://xml.apache.org/xalan-c"; target="_top">Xalan-C 1.x 
XSLT Processor</a></dd>
        <dt><b>Credits for the tests:</b></dt>
        <dd><a href="mailto:[EMAIL PROTECTED]">Shane Curcuru</a></dd>
        <dd><a href="mailto:[EMAIL PROTECTED]">Paul Dick</a></dd>
        <dd><a href="mailto:[EMAIL PROTECTED]">David Marston</a></dd>
        <dd><a href="mailto:[EMAIL PROTECTED]">Gary L Peskin</a></dd>
        <dd>Many other <a href="http://xml.apache.org/mail.html";>xalan-dev</a> 
subscribers</dd>
        <dd>Many other helpers who we still need to credit! Sorry!</dd>
      </dl>
  <p>These tests are provided for Xalan contributors to evaluate the impact of 
code changes. 
  Run the tests on the unchanged code, make the change and rebuild, then run 
the tests again 
  and compare the results. Results should also be compared to the files in the 
"-gold" 
  directory trees.</p>
  
  <dl>
    <dt><b>Brief overview of directory structure:</b></dt>
    <dt>xml-xalan/test/.</dt><dd>Top level dir for all Xalan versions/products 
tests</dd>
    <dt>..test/java</dt><dd>Top level for Java test automation</dd>
    <dt>....java/bin</dt><dd>Java test automation dependencies (includes 
    <a href="http://jakarta.apache.org/ant/index.html";>Ant 1.2</a>)</dd>
    <dt>....java/src</dt><dd>Java test automation source tree (primary 
packages: 
    <a href="java/src/org/apache/qetest/package.html">org.apache.qetest</a>, 
    <a 
href="java/src/org/apache/qetest/xsl/package.html">org.apache.qetest.xsl</a>, 
    <a 
href="java/src/org/apache/qetest/trax/package.html">org.apache.qetest.trax</a>, 
    <a 
href="java/src/org/apache/qetest/xalanj1/package.html">org.apache.qetest.xalanj1</a>,
 
    )</dd>
    <dt>..test/tests</dt><dd>Top level for XSLT stylesheet trees</dd>
    <dt>....tests/contrib</dt><dd>Directory tree of user-contributed 
stylesheets</dd>
    <dt>....tests/contrib-gold</dt><dd>Directory tree of user-contributed 
stylesheets gold 
    output reference files (this tree should mirror the structure of 
contrib)</dd>
    <dt>....tests/apitest</dt><dd>Directory tree for stylesheets used in Java 
API tests</dd>
    <dt>....tests/apitest-gold</dt><dd>Matching Directory tree of gold files 
for Java API tests</dd>
    <dt>....tests/extension</dt><dd>Directory tree for stylesheets used in 
Xalan-specific extension tests</dd>
    <dt>....tests/extension/xalanj1</dt><dd>Xalan-J 1.x version-specific 
extension tests</dd>
    <dt>....tests/extension/xalanj2</dt><dd>Xalan-J 2.x version-specific 
extension tests</dd>
    <dt>....tests/extension-gold</dt><dd>Matching Directory tree of gold files 
for Xalan-specific extension tests</dd>
    <dt>....tests/...</dt><dd>More stylesheet trees to be added!</dd>
    <dt>....tests/...-gold</dt><dd></dd>
  </dl>
  <p>Some tests are ones that Xalan has not passed to date, but we know the 
  correct ("gold") result by analysis or by trying the test on other 
processors. At Lotus/IBM, 
  we have some additional test cases that we can't give away, so a patch may 
pass all these 
  tests and fail others, but those cases should be rare.</p>
  
  <p>Test cases in the "conf" group will ultimately be submitted to OASIS as 
part of 
  their vendor-independent project on XSLT/XPath Conformance Testing. For more 
  information about this project, visit 
  <a 
href="http://www.oasis-open.org/committees/xslt/index.html";>http://www.oasis-open.org/committees/xslt/index.html</a></p>
  
  <p>The project will combine test cases from different sources and provide a 
way to 
  customize the set of tests according to design decisions made for each 
processor 
  under test. We expect that when the OASIS test system is delivered, it will 
supplant 
  most or all of the "conf" group provided here. Conformance tests are designed 
as 
  streamlined "atomic" (or at least "molecular") tests, so there are several 
hundred of them.</p>
  
  <p>You are invited to submit additional test cases by checking them into the 
"contrib" 
  area or mailing them to <a href="mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]</a>. If you want to help with testing Xalan and wish to be 
  assigned to write some cases, send email to David Marston stating your 
interest. 
  Contributed tests may be sent along to the OASIS conformance project if they 
test 
  conformance. Guidelines for comments in tests are still evolving as part of 
the 
  OASIS project, so it may be necessary to add more comments or other 
annotation 
  after the test is submitted.</p>
  <hr>
  <p>Quick-doc: to build/run automation:</p>
  <p>Build (DOS format, UNIX is similar): <br>
  <code>set JARDIR=c:\all-jars-here</code> (put xalan.jar, xerces.jar, etc. 
there)<br>
  <code>cd xml-xalan\test\java</code><br>
  either: <code>build.bat package.trax</code> (packages build\testxsl.jar for 
Xalan-J 2.x build testing with TRAX interface)<br>
  or: <code>build.bat package.xalan1</code> (packages build\testxsl.jar for 
Xalan-J 1.x build testing)<br>
  </p>
  <p>Run (DOS format, UNIX is similar): <br>
  <code>set JARDIR=c:\all-jars-here</code> (put xalan.jar, xerces.jar, 
<b>and</b> testxsl.jar etc. there)<br>
  
  <code>cd xml-xalan\test</code><br>
  Any of:<br>
  <code>runtest.bat TestClassName [options]</code> (see batch file for 
comments)<br>
  <code>traxapitest.bat TestClassName [options]</code> (runs TRAX interface 
tests with Xalan-J 2.x)<br>
  <code>xalanj1apitest.bat TestClassName [options]</code> (runs Xalan-J 1.x API 
tests)<br>
  <code>contribtest.bat [options]</code> (runs ConformanceTest driver over 
contrib test tree)<br>
  </p>
    </body>
  </html>
  
  
  
  
  
  1.1                  xml-xalan/test/runtest.bat
  
  Index: runtest.bat
  ===================================================================
  @echo off
  @goto start
  @REM  Name:   runtest.bat
  @REM  Author: [EMAIL PROTECTED]
  :usage
  @echo runtest.bat - runs Xalan-J test automation
  @echo.
  @echo Notes/prerequisites: 
  @echo   JAVA_OPTS Will be passed to java.exe or jview.exe
  @echo   EXTRA_CP Will be appended to the classpath
  @echo   END_PKG Will be the subpackage name after org.apache.qetest
  @echo Common args include (from the java file, ignore first two "ERROR" 
lines): 
  @REM Call with illegal arg to force Java code to print usage()
  java -classpath %CLASSPATH%;testxsl.jar;%JARDIR%\testxsl.jar 
org.apache.qetest.xsl.XSLProcessorTestBase -load
  @echo.
  goto done
  @REM ------------------------------------------------------------------------
  
  :start
  @echo %0 beginning...
  @REM must have an option to continue
  if '%1' == '' goto usage
  if '%1' == '-h' goto usage
  if '%1' == '-H' goto usage
  if '%1' == '-?' goto usage
  if '%1' == '-jview' goto setjv
  if '%1' == '-JVIEW' goto setjv
  
  @REM Non-jview: Trickery to guess appropriate location of java.exe program
  if '%JAVA_HOME%' == '' set JAVA_EXE=java
  if not '%JAVA_HOME%' == '' set JAVA_EXE=%JAVA_HOME%\bin\java
  set CMDCP=-classpath
  goto dojardir
  
  :setjv
  @REM -jview: Run Microsoft's jview instead of java
  @REM    Note: We assume user has setup environment correctly!
  @REM    shift to get rid of -jview arg; just pass rest of args along
  shift
  set JAVA_EXE=jview
  set CMDCP=/cp
  goto dojardir
  
  :dojardir
  @REM If JARDIR blank, use the existing classpath first, so we pick up 
  @REM    any classes the user may have specified before default ones
  @REM Note that this could cause conflicts if the user only specified 
  @REM    some of the needed jars in the classpath, and then we add separate
  @REM    copies of them later on.
  if '%JARDIR%' == '' echo runtest.bat must have JARDIR set!
  if '%JARDIR%' == '' goto done
  
  @REM If JARDIR set, put those references first then default classpath
  if not '%JARDIR%' == '' set 
TEST_CP=%JARDIR%\testxsl.jar;%JARDIR%\xerces.jar;%JARDIR%\xalan.jar;%JARDIR%\bsf.jar;%JARDIR%\js.jar;%CLASSPATH%
  
  @REM Wrappers use EXTRA_CP to add items to our classpath; if set, append
  if not '%EXTRA_CP%' == '' set TEST_CP=%TEST_CP%;%EXTRA_CP%
  
  @REM Wrappers use END_PKG to switch around the end of the packagename; if not 
set, default it
  if '%END_PKG%' == '' set END_PKG=xsl
  
  @REM If exactly one option passed, assume we run: %JAVA_EXE% TestName -load 
TestName.prop
  @REM this is a convenience for most tests, if they have a same-named prop 
file with them
  if '%2' == '' echo %JAVA_EXE% %JAVA_OPTS% %CMDCP% %TEST_CP% 
org.apache.qetest.%END_PKG%.%1 -load %1.prop
  if '%2' == '' %JAVA_EXE% %JAVA_OPTS% %CMDCP% %TEST_CP% 
org.apache.qetest.%END_PKG%.%1 -load %1.prop
  if '%2' == '' goto done
  
  @REM Otherwise, assume it's a bare classname to run with extra args
  echo %JAVA_EXE% %JAVA_OPTS% %CMDCP% %TEST_CP% org.apache.qetest.%END_PKG%.%1  
%2 %3 %4 %5 %6 %7 %8 %9
  %JAVA_EXE% %JAVA_OPTS% %CMDCP% %TEST_CP% org.apache.qetest.%END_PKG%.%1  %2 
%3 %4 %5 %6 %7 %8 %9
  
  :done
  @echo %0 complete!
  set TEST_CP=
  set JAVA_EXE=
  set CMDCP=
  if '%END_PKG%' == 'xsl' set END_PKG=
  :end
  
  
  
  1.1                  xml-xalan/test/traxapitest.bat
  
  Index: traxapitest.bat
  ===================================================================
  @echo off
  @goto start
  @REM  Name:   traxapitest.bat
  @REM  Author: [EMAIL PROTECTED]
  
  :start
  set END_PKG=trax
  @echo Wrapper using 'trax.%1 -load APITest.properties'
  call runtest.bat %1 -load APITest.properties %2 %3 %4 %5 %6 %7 %8 %9
  set END_PKG=
  :end
  
  
  
  1.1                  xml-xalan/test/xalanj1apitest.bat
  
  Index: xalanj1apitest.bat
  ===================================================================
  @echo off
  @goto start
  @REM  Name:   xalanj1apitest.bat
  @REM  Author: [EMAIL PROTECTED]
  
  :start
  set END_PKG=xalanj1
  @echo Wrapper using 'xalanj1.%1 -load APITest.properties'
  call runtest.bat %1 -load APITest.properties %2 %3 %4 %5 %6 %7 %8 %9
  set END_PKG=
  :end
  
  
  

Reply via email to