001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: *
017: */
018: package org.apache.tools.ant.taskdefs.optional.junit;
019:
020: /**
021: * <p> Interface groups XML constants.
022: * Interface that groups all constants used throughout the <tt>XML</tt>
023: * documents that are generated by the <tt>XMLJUnitResultFormatter</tt>.
024: * <p>
025: * As of now the DTD is:
026: * <code><pre>
027: * <!ELEMENT testsuites (testsuite*)>
028: *
029: * <!ELEMENT testsuite (properties, testcase*,
030: * failure?, error?,
031: * system-out?, system-err?)>
032: * <!ATTLIST testsuite name CDATA #REQUIRED>
033: * <!ATTLIST testsuite tests CDATA #REQUIRED>
034: * <!ATTLIST testsuite failures CDATA #REQUIRED>
035: * <!ATTLIST testsuite errors CDATA #REQUIRED>
036: * <!ATTLIST testsuite time CDATA #REQUIRED>
037: * <!ATTLIST testsuite package CDATA #IMPLIED>
038: * <!ATTLIST testsuite id CDATA #IMPLIED>
039: *
040: *
041: * <!ELEMENT properties (property*)>
042: *
043: * <!ELEMENT property EMPTY>
044: * <!ATTLIST property name CDATA #REQUIRED>
045: * <!ATTLIST property value CDATA #REQUIRED>
046: *
047: * <!ELEMENT testcase (failure?, error?)>
048: * <!ATTLIST testcase name CDATA #REQUIRED>
049: * <!ATTLIST testcase classname CDATA #IMPLIED>
050: * <!ATTLIST testcase time CDATA #REQUIRED>
051: *
052: * <!ELEMENT failure (#PCDATA)>
053: * <!ATTLIST failure message CDATA #IMPLIED>
054: * <!ATTLIST failure type CDATA #REQUIRED>
055: *
056: * <!ELEMENT error (#PCDATA)>
057: * <!ATTLIST error message CDATA #IMPLIED>
058: * <!ATTLIST error type CDATA #REQUIRED>
059: *
060: * <!ELEMENT system-err (#PCDATA)>
061: *
062: * <!ELEMENT system-out (#PCDATA)>
063: *
064: * </pre></code>
065: * @see XMLJUnitResultFormatter
066: * @see XMLResultAggregator
067: */
068: public interface XMLConstants {
069: /** the testsuites element for the aggregate document */
070: String TESTSUITES = "testsuites";
071:
072: /** the testsuite element */
073: String TESTSUITE = "testsuite";
074:
075: /** the testcase element */
076: String TESTCASE = "testcase";
077:
078: /** the error element */
079: String ERROR = "error";
080:
081: /** the failure element */
082: String FAILURE = "failure";
083:
084: /** the system-err element */
085: String SYSTEM_ERR = "system-err";
086:
087: /** the system-out element */
088: String SYSTEM_OUT = "system-out";
089:
090: /** package attribute for the aggregate document */
091: String ATTR_PACKAGE = "package";
092:
093: /** name attribute for property, testcase and testsuite elements */
094: String ATTR_NAME = "name";
095:
096: /** time attribute for testcase and testsuite elements */
097: String ATTR_TIME = "time";
098:
099: /** errors attribute for testsuite elements */
100: String ATTR_ERRORS = "errors";
101:
102: /** failures attribute for testsuite elements */
103: String ATTR_FAILURES = "failures";
104:
105: /** tests attribute for testsuite elements */
106: String ATTR_TESTS = "tests";
107:
108: /** type attribute for failure and error elements */
109: String ATTR_TYPE = "type";
110:
111: /** message attribute for failure elements */
112: String ATTR_MESSAGE = "message";
113:
114: /** the properties element */
115: String PROPERTIES = "properties";
116:
117: /** the property element */
118: String PROPERTY = "property";
119:
120: /** value attribute for property elements */
121: String ATTR_VALUE = "value";
122:
123: /** classname attribute for testcase elements */
124: String ATTR_CLASSNAME = "classname";
125:
126: /** id attribute */
127: String ATTR_ID = "id";
128:
129: /**
130: * timestamp of test cases
131: */
132: String TIMESTAMP = "timestamp";
133:
134: /**
135: * name of host running the tests
136: */
137: String HOSTNAME = "hostname";
138: }
|