| <HTML><HEAD><SCRIPT language="JavaScript" src="resources/script.js" type="text/javascript"></SCRIPT><TITLE>Submitting New Tests</TITLE></HEAD><BODY alink="#ff0000" bgcolor="#ffffff" leftmargin="4" link="#0000ff" marginheight="4" marginwidth="4" text="#000000" topmargin="4" vlink="#0000aa"><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" height="60" rowspan="3" valign="top" width="135"><IMG alt="logo" border="0" height="60" hspace="0" src="resources/logo.gif" vspace="0" width="135"></TD><TD align="left" colspan="4" height="5" valign="top" width="456"><IMG alt="line" border="0" height="5" hspace="0" src="resources/line.gif" vspace="0" width="456"></TD><TD align="left" height="60" rowspan="3" valign="top" width="29"><IMG alt="right" border="0" height="60" hspace="0" src="resources/right.gif" vspace="0" width="29"></TD></TR><TR><TD align="left" bgcolor="#0086b2" colspan="4" height="35" valign="top" width="456"><IMG alt="" border="0" height="35" hspace="0" src="graphics/submit-header.jpg" vspace="0" width="456"></TD></TR><TR><TD align="left" height="20" valign="top" width="168"><IMG alt="bottom" border="0" height="20" hspace="0" src="resources/bottom.gif" vspace="0" width="168"></TD><TD align="left" height="20" valign="top" width="96"><A href="http://xml.apache.org/" onMouseOut="rolloverOff('xml');" onMouseOver="rolloverOn('xml');" target="new"><IMG alt="http://xml.apache.org/" border="0" height="20" hspace="0" name="xml" onLoad="rolloverLoad('xml','resources/button-xml-hi.gif','resources/button-xml-lo.gif');" src="resources/button-xml-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.apache.org/" onMouseOut="rolloverOff('asf');" onMouseOver="rolloverOn('asf');" target="new"><IMG alt="http://www.apache.org/" border="0" height="20" hspace="0" name="asf" onLoad="rolloverLoad('asf','resources/button-asf-hi.gif','resources/button-asf-lo.gif');" src="resources/button-asf-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.w3.org/" onMouseOut="rolloverOff('w3c');" onMouseOver="rolloverOn('w3c');" target="new"><IMG alt="http://www.w3.org/" border="0" height="20" hspace="0" name="w3c" onLoad="rolloverLoad('w3c','resources/button-w3c-hi.gif','resources/button-w3c-lo.gif');" src="resources/button-w3c-lo.gif" vspace="0" width="96"></A></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" valign="top" width="120"><IMG alt="join" border="0" height="14" hspace="0" src="resources/join.gif" vspace="0" width="120"><BR> |
| |
| |
| |
| <A href="overview.html" onMouseOut="rolloverOff('side-overview');" onMouseOver="rolloverOn('side-overview');"><IMG alt="Overview" border="0" height="12" hspace="0" name="side-overview" onLoad="rolloverLoad('side-overview','graphics/overview-label-2.jpg','graphics/overview-label-3.jpg');" src="graphics/overview-label-3.jpg" vspace="0" width="120"></A><BR> |
| |
| <A href="getstarted.html" onMouseOut="rolloverOff('side-getstarted');" onMouseOver="rolloverOn('side-getstarted');"><IMG alt="Getting Started" border="0" height="12" hspace="0" name="side-getstarted" onLoad="rolloverLoad('side-getstarted','graphics/getstarted-label-2.jpg','graphics/getstarted-label-3.jpg');" src="graphics/getstarted-label-3.jpg" vspace="0" width="120"></A><BR> |
| |
| <IMG alt="separator" border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR> |
| |
| <A href="apidocs/index.html" onMouseOut="rolloverOff('side-ext-10');" onMouseOver="rolloverOn('side-ext-10');"><IMG alt="Java API" border="0" height="12" hspace="0" name="side-ext-10" onLoad="rolloverLoad('side-ext-10','graphics/ext-10-label-2.jpg','graphics/ext-10-label-3.jpg');" src="graphics/ext-10-label-3.jpg" vspace="0" width="120"></A><BR> |
| |
| <IMG alt="separator" border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR> |
| |
| <A href="faq.html" onMouseOut="rolloverOff('side-faq');" onMouseOver="rolloverOn('side-faq');"><IMG alt="FAQ" border="0" height="12" hspace="0" name="side-faq" onLoad="rolloverLoad('side-faq','graphics/faq-label-2.jpg','graphics/faq-label-3.jpg');" src="graphics/faq-label-3.jpg" vspace="0" width="120"></A><BR> |
| |
| <A href="run.html" onMouseOut="rolloverOff('side-run');" onMouseOver="rolloverOn('side-run');"><IMG alt="Running Tests" border="0" height="12" hspace="0" name="side-run" onLoad="rolloverLoad('side-run','graphics/run-label-2.jpg','graphics/run-label-3.jpg');" src="graphics/run-label-3.jpg" vspace="0" width="120"></A><BR> |
| |
| <IMG alt="Writing New Tests" border="0" height="12" hspace="0" src="graphics/submit-label-1.jpg" vspace="0" width="120"><BR> |
| |
| <A href="design.html" onMouseOut="rolloverOff('side-design');" onMouseOver="rolloverOn('side-design');"><IMG alt="Test Standards" border="0" height="12" hspace="0" name="side-design" onLoad="rolloverLoad('side-design','graphics/design-label-2.jpg','graphics/design-label-3.jpg');" src="graphics/design-label-3.jpg" vspace="0" width="120"></A><BR> |
| |
| <A href="xalanc.html" onMouseOut="rolloverOff('side-xalanc');" onMouseOver="rolloverOn('side-xalanc');"><IMG alt="Xalan-C Tests" border="0" height="12" hspace="0" name="side-xalanc" onLoad="rolloverLoad('side-xalanc','graphics/xalanc-label-2.jpg','graphics/xalanc-label-3.jpg');" src="graphics/xalanc-label-3.jpg" vspace="0" width="120"></A><BR> |
| <IMG alt="separator" border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR> |
| |
| <A href="http://xml.apache.org/xalan-j" onMouseOut="rolloverOff('side-ext-28');" onMouseOver="rolloverOn('side-ext-28');"><IMG alt="Xalan-J 2.x" border="0" height="12" hspace="0" name="side-ext-28" onLoad="rolloverLoad('side-ext-28','graphics/ext-28-label-2.jpg','graphics/ext-28-label-3.jpg');" src="graphics/ext-28-label-3.jpg" vspace="0" width="120"></A><BR> |
| <A href="http://xml.apache.org/xalan" onMouseOut="rolloverOff('side-ext-30');" onMouseOver="rolloverOn('side-ext-30');"><IMG alt="Xalan-J 1.x" border="0" height="12" hspace="0" name="side-ext-30" onLoad="rolloverLoad('side-ext-30','graphics/ext-30-label-2.jpg','graphics/ext-30-label-3.jpg');" src="graphics/ext-30-label-3.jpg" vspace="0" width="120"></A><BR> |
| <A href="http://xml.apache.org/xalan-c" onMouseOut="rolloverOff('side-ext-32');" onMouseOver="rolloverOn('side-ext-32');"><IMG alt="Xalan-C 1.x" border="0" height="12" hspace="0" name="side-ext-32" onLoad="rolloverLoad('side-ext-32','graphics/ext-32-label-2.jpg','graphics/ext-32-label-3.jpg');" src="graphics/ext-32-label-3.jpg" vspace="0" width="120"></A><BR> |
| |
| <IMG alt="close" border="0" height="14" hspace="0" src="resources/close.gif" vspace="0" width="120"><BR></TD><TD align="left" valign="top" width="500"><TABLE border="0" cellpadding="3" cellspacing="0"><TR><TD> |
| <UL> |
| <LI><A href="#write-API-tests">How to Write API Tests</A></LI> |
| <LI><A href="#write-xsl-tests">How to Write Stylesheet Tests</A></LI> |
| </UL> |
| |
| <A name="write-API-tests"><!--anchor--></A> |
| <TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="666699" colspan="2" width="494"><TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#039acc" height="1" width="1"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#039acc" height="1" width="492"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#039acc" width="1"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" width="492"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG alt="" border="0" height="2" hspace="0" src="resources/void.gif" vspace="0" width="2"><B>How to Write API Tests</B></FONT></TD><TD bgcolor="#017299" width="1"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#017299" height="1" width="492"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#017299" height="1" width="1"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></TD></TR><TR><TD width="10"> </TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif"> |
| <P>Use the existing framework! It provides lots of useful functionality, |
| and will help us to maintain your tests.</P> |
| <P>For example: To write a new TRAX/javax.xml.transform API test:</P> |
| <P>- open org.apache.qetest.trax.REPLACE_template_for_new_tests.java</P> |
| <P>- follow directions to rename the file (and put in the correct dom/sax/stream |
| subdir, if needed) and search-and-replace all REPLACE_* tokens</P> |
| <P>- write one-time-only setup code in testFileInit()</P> |
| <P>- write a number of testCase<I>n</I> methods. Each one should |
| be independent from the other test cases. Try to test between one |
| and ten or so individual test points (or calls to reporter.check(...) |
| for each testCase method.</P> |
| <P>- Never use System.out/.err - always use reporter.log*Msg() (to report |
| general messages), or reporter.check() (to validate a specific test point)</P> |
| <TABLE border="0" cellpadding="0" cellspacing="3" width="100%"><TR><TD valign="top" width="20"><IMG alt="Note" border="0" height="24" hspace="0" src="resources/note.gif" vspace="0" width="20"></TD><TD valign="top"><FONT color="#000000" face="arial,helvetica,sanserif" size="-1"><I>This is an important point. Bottlenecking all output from the tests |
| through a <A href="apidocs/org/apache/qetest/Reporter.html">Reporter</A> |
| allows us to manage and analyze the results much more easily. Reporters also |
| put all output to both the console and to your <A href="run.html#test-options-logfile">logFile</A>.</I></FONT></TD></TR></TABLE> |
| <P>- Build the tests, including your new one, <A href="getstarted.html#how-to-build">as described</A></P> |
| <P>- Put your test's supporting xml/xsl files in xml-xalan/test/tests/api/trax or |
| subdirectories</P> |
| <P>- Use xml-xalan\test\traxapitest.bat (and APITest.properties) <A href="run.html#how-to-run">to run your test</A>! |
| Results will be placed by default into xml-xalan\test\results-api\APITest.xml</P> |
| <P>The same basic template can be used for other kinds of API tests, with appropriate |
| changes to the package name, etc.</P> |
| <P>You can pretty-print the results by using the <A href="run.html#how-to-view-results">viewResults.xsl stylesheet</A> to turn |
| the XML into an HTML format.</P> |
| </FONT></TD></TR></TABLE><BR> |
| |
| <A name="write-xsl-tests"><!--anchor--></A> |
| <TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="666699" colspan="2" width="494"><TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#039acc" height="1" width="1"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#039acc" height="1" width="492"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#039acc" width="1"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" width="492"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG alt="" border="0" height="2" hspace="0" src="resources/void.gif" vspace="0" width="2"><B>How to Write Stylesheet Tests</B></FONT></TD><TD bgcolor="#017299" width="1"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#017299" height="1" width="492"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#017299" height="1" width="1"><IMG alt="" border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></TD></TR><TR><TD width="10"> </TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif"> |
| <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 OASIS project will combine test cases from different sources and will 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. |
| Currently, Lotus/IBM is working on submitting a significant body of Conformance tests |
| to OASIS. We also would like to temporarily provide most of the tests here on |
| Apache for Xalan developer's use, while OASIS finalizes it's test suite.</P> |
| |
| <P>You are invited to submit additional test cases by checking them into the "contrib" |
| area or mailing them to <A href="mailto:David_Marston@lotus.com">David_Marston@lotus.com</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. We hope to have a template for contributing |
| stylesheet tests available soon that will closely match the eventual OASIS format.</P> |
| |
| <P>The Xalan team will continue to provide test automation, like the |
| StylesheetTestletDriver and various StylesheetTestlet classes, that |
| enables a user to easily run large suites of tests with fully rolled-up |
| reporting and a rich set of options.</P> |
| </FONT></TD></TR></TABLE><BR> |
| </TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD bgcolor="#0086b2"><IMG alt="dot" height="1" src="resources/dot.gif" width="1"></TD></TR><TR><TD align="center"><FONT color="#0086b2" size="-1"><I> |
| Copyright © 2000 The Apache Software Foundation. |
| All Rights Reserved. |
| </I></FONT></TD></TR></TABLE></BODY></HTML> |