vhardy 01/10/15 04:21:45
Modified: test-sources/org/apache/batik/test/xml
XMLTestSuiteLoader.java
XMLTestSuiteRunnerValidator.java XTSConstants.java
test-resources/org/apache/batik/test/xml testSuiteA.xml
Log:
Added a <testGroup> tag in test suite files. This lets the test suite
author group tests under a common id and use that id in targeted test
runs. For example:
<testSuite id="samplesRendering">
<testGroup id="samples">
<!-- samples/*.svg tests go here -->
</testGroup>
<testGroup id="tests.spec">
<testGroup id="structure">
<!-- samples/tests/spec/structure/*.svg" tests here -->
</testGroup>
</testGroup>
</testSuite>
Revision Changes Path
1.3 +5 -1
xml-batik/test-sources/org/apache/batik/test/xml/XMLTestSuiteLoader.java
Index: XMLTestSuiteLoader.java
===================================================================
RCS file:
/home/cvs/xml-batik/test-sources/org/apache/batik/test/xml/XMLTestSuiteLoader.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLTestSuiteLoader.java 2001/10/04 08:25:37 1.2
+++ XMLTestSuiteLoader.java 2001/10/15 11:21:44 1.3
@@ -43,7 +43,7 @@
* into a <tt>TestSuite</tt> object.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Hardy</a>
- * @version $Id: XMLTestSuiteLoader.java,v 1.2 2001/10/04 08:25:37 vhardy Exp $
+ * @version $Id: XMLTestSuiteLoader.java,v 1.3 2001/10/15 11:21:44 vhardy Exp $
*/
public class XMLTestSuiteLoader implements XTSConstants {
/**
@@ -152,6 +152,10 @@
// System.out.println("Processing child : " + tagName);
if(tagName == XTS_TEST_TAG){
Test t = buildTest(childElement);
+ testSuite.addTest(t);
+ }
+ else if(tagName == XTS_TEST_GROUP_TAG){
+ Test t = buildTestSuite(childElement, testSuite);
testSuite.addTest(t);
}
}
1.2 +21 -7
xml-batik/test-sources/org/apache/batik/test/xml/XMLTestSuiteRunnerValidator.java
Index: XMLTestSuiteRunnerValidator.java
===================================================================
RCS file:
/home/cvs/xml-batik/test-sources/org/apache/batik/test/xml/XMLTestSuiteRunnerValidator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XMLTestSuiteRunnerValidator.java 2001/10/04 08:25:37 1.1
+++ XMLTestSuiteRunnerValidator.java 2001/10/15 11:21:44 1.2
@@ -43,6 +43,9 @@
* - test, id="A1" <br />
* - test, id="A2" <br />
* - test, id="duplicateId" <br />
+ * - testGroup, id="AG" <br />
+ * - test, id="AG1" <br />
+ * - test, id="AG2" <br />
*
* and: <br />
* - testSuite, id="B" <br />
@@ -54,7 +57,7 @@
* where all the leaf test pass. <br />
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Hardy</a>
- * @version $Id: XMLTestSuiteRunnerValidator.java,v 1.1 2001/10/04 08:25:37 vhardy
Exp $
+ * @version $Id: XMLTestSuiteRunnerValidator.java,v 1.2 2001/10/15 11:21:44 vhardy
Exp $
*/
public class XMLTestSuiteRunnerValidator extends DefaultTestSuite {
public static final String ERROR_TEST_NOT_RUN
@@ -94,11 +97,13 @@
* - 1 target test: "all.B.B3". A single test-report should be produced
* for B3. <br />
* - 1 target test-suite: "all.A". A test-report with
- * "A1", "A2" and "duplicatedId" should be produced.<br />
+ * "A1", "A2", "duplicatedId", "AG", "AG.AG1" and "AG.AG2" should be
produced.<br />
* - 1 target test-suite and 2 tests: "all.B and
* all.A.A1 and all.A.A2. A test-report for "all.B.B1", "all.B.B2",
* "all.B.B3", "all.B.duplicatedId", "all.A.A1" and "all.A.A2"
* should be produced. <br />
+ * - 1 target testGroup: "AG". A test-report with
+ * "A.AG", "A.AG.AG1" and "A.AG.AG2" should be produced.<br />
* <br />
* In addition, the following test with non-qualified ids: <br />
* - 1 target test id: "duplicatedId" should be produced and
@@ -108,22 +113,31 @@
Object config[][] = {
{"", new String[]{"all",
"all.A", "all.A.A1", "all.A.A2",
"all.A.duplicatedId", "all.A.duplicatedId.1", "all.A.duplicatedId.2",
+ "all.A.AG", "all.A.AG.AG1", "all.A.AG.AG2",
"all.B", "all.B.B1", "all.B.B2", "all.B.B3",
"all.B.duplicatedId"}},
{"all.B.B3", new String[] {"all", "all.B", "all.B.B3"}},
{"all.A", new String[] {"all",
- "all.A", "all.A.A1", "all.A.A2",
"all.A.duplicatedId", "all.A.duplicatedId.1", "all.A.duplicatedId.2"}},
+ "all.A", "all.A.A1", "all.A.A2",
"all.A.duplicatedId", "all.A.duplicatedId.1", "all.A.duplicatedId.2",
+ "all.A.AG", "all.A.AG.AG1", "all.A.AG.AG2"}},
{"all.B all.A.A1 all.A.A2",
new String[] {"all",
"all.B", "all.B.B1", "all.B.B2", "all.B.B3",
"all.B.duplicatedId",
"all.A", "all.A.A1", "all.A.A2"}},
- {"duplicatedId", new String[] {"all",
- "all.A", "all.A.duplicatedId",
"all.A.duplicatedId.1", "all.A.duplicatedId.2",
- "all.B", "all.B.duplicatedId"}}
- };
+ {"duplicatedId",
+ new String[] {"all",
+ "all.A", "all.A.duplicatedId", "all.A.duplicatedId.1",
"all.A.duplicatedId.2",
+ "all.B", "all.B.duplicatedId"}},
+
+ {"AG",
+ new String[] {"all",
+ "all.A",
+ "all.A.AG",
+ "all.A.AG.AG1", "all.A.AG.AG2"}}
+ };
for(int i=0; i<config.length; i++){
addTest(new XMLTestSuiteRunnerTest(config[i]));
1.5 +2 -1
xml-batik/test-sources/org/apache/batik/test/xml/XTSConstants.java
Index: XTSConstants.java
===================================================================
RCS file:
/home/cvs/xml-batik/test-sources/org/apache/batik/test/xml/XTSConstants.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XTSConstants.java 2001/10/04 08:25:37 1.4
+++ XTSConstants.java 2001/10/15 11:21:44 1.5
@@ -12,7 +12,7 @@
* Contains constants for the XML Test Suite (XTS) syntax.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Hardy</a>
- * @version $Id: XTSConstants.java,v 1.4 2001/10/04 08:25:37 vhardy Exp $
+ * @version $Id: XTSConstants.java,v 1.5 2001/10/15 11:21:44 vhardy Exp $
*/
public interface XTSConstants extends XMLReflectConstants{
String XTS_NAMESPACE_URI
@@ -22,6 +22,7 @@
// XTS tags
/////////////////////////////////////////////////////////////////////////
String XTS_TEST_TAG = "test";
+ String XTS_TEST_GROUP_TAG = "testGroup";
String XTS_TEST_SUITE_TAG = "testSuite";
/////////////////////////////////////////////////////////////////////////
1.2 +5 -1
xml-batik/test-resources/org/apache/batik/test/xml/testSuiteA.xml
Index: testSuiteA.xml
===================================================================
RCS file:
/home/cvs/xml-batik/test-resources/org/apache/batik/test/xml/testSuiteA.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- testSuiteA.xml 2001/10/04 08:25:37 1.1
+++ testSuiteA.xml 2001/10/15 11:21:44 1.2
@@ -8,10 +8,14 @@
<!-- ========================================================================= -->
<!-- @author [EMAIL PROTECTED] -->
-<!-- @version $Id: testSuiteA.xml,v 1.1 2001/10/04 08:25:37 vhardy Exp $ -->
+<!-- @version $Id: testSuiteA.xml,v 1.2 2001/10/15 11:21:44 vhardy Exp $ -->
<!-- ========================================================================= -->
<testSuite id="A" name="Dummy Test Suite A">
<test id="A1" class="org.apache.batik.test.xml.DummyValidTest" />
<test id="A2" class="org.apache.batik.test.xml.DummyValidTest" />
<test id="duplicatedId" class="org.apache.batik.test.xml.DummyValidTestSuite" />
+ <testGroup id="AG" name="AG Test Group">
+ <test id="AG1" class="org.apache.batik.test.xml.DummyValidTest" />
+ <test id="AG2" class="org.apache.batik.test.xml.DummyValidTest" />
+ </testGroup>
</testSuite>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]