1
<?xml version="1.0" encoding="UTF-8" ?>
4
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
9
Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
10
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
12
This program is free software; you can redistribute it and/or
13
modify it under the terms of the GNU General Public License version
14
2 only, as published by the Free Software Foundation.
16
This program is distributed in the hope that it will be useful, but
17
WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
General Public License version 2 for more details (a copy is
20
included at /legal/license.txt).
22
You should have received a copy of the GNU General Public License
23
version 2 along with this work; if not, write to the Free Software
24
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
27
Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
28
Clara, CA 95054 or visit www.sun.com if you need additional
29
information or have any questions.
33
<xsd:simpleType name="IDWithColon">
36
IDs are colon free strings followed by a colon followed by digits.
37
The digits are there to disambiguate entries that are repeated.
38
Repeats can occur for test results, for instance, when a test is
42
<xsd:restriction base="xsd:string">
43
<xsd:pattern value="[\w\.\[\]\(\)\{\},_-]+:[0-9]+"/>
47
<xsd:simpleType name="Machine">
50
Machines are identified by name and date. The name must be qualified.
51
Only lower case is accepted in the COF.
52
Host name space specifiers are defined in http://www.ietf.org/rfc/rfc2141.txt . This
53
schema checks for the existence of two or more domains in the name space specifier.
56
<xsd:restriction base="xsd:string">
57
<xsd:pattern value="([a-z0-9][a-z0-9\-]*[a-z0-9]\.){2,}([a-z][a-z0-9\-]*[a-z0-9])"/>
61
<xsd:simpleType name="KeyWord">
64
Keywords are very rough descriptions of test content.
67
<xsd:restriction base="xsd:string">
68
<xsd:enumeration value="DTF"/>
69
<xsd:enumeration value="JPI"/>
70
<xsd:enumeration value="JAWS"/>
71
<xsd:enumeration value="JSS"/>
72
<xsd:enumeration value="demo"/>
73
<xsd:enumeration value="manual"/>
77
<xsd:complexType name="KeyWords" abstract="false">
79
<xsd:element name="keyword" type="KeyWord" minOccurs="1" maxOccurs="unbounded"/>
83
<xsd:simpleType name="Bits">
84
<xsd:restriction base="xsd:int">
85
<xsd:enumeration value="32"/>
86
<xsd:enumeration value="64"/>
90
<xsd:simpleType name="DisplayDepth">
93
Display depth is recorded as part of a software configuration.
96
<xsd:restriction base="xsd:int">
97
<xsd:enumeration value="8"/>
98
<xsd:enumeration value="12"/>
99
<xsd:enumeration value="15"/>
100
<xsd:enumeration value="16"/>
101
<xsd:enumeration value="24"/>
102
<xsd:enumeration value="32"/>
106
<xsd:complexType name="OS">
112
Name should be one of windows, redhat_linux, turbo_linux,
113
suse_linux, caldera_linux, mandrake_linux, solaris, palmos,
114
psos, symbianos, or vxworks.
115
These names are derived from BugTraq names.
118
Versions are derived from BugTraq names. Allowable version
119
strings for Windows are 2000, 95, 98, ce, me, nt_4.0,
120
pocketpc2000, pocketpc2002, and xp.
121
Allowable version strings for Solaris are 2.6, 2.7, 8, and 9.
122
Linux versioning is sane in comparison with that of Solaris
123
and Windows. Redhat versions are 5.1, 5.2, 6.0, 6.1, 6.2,
128
<xsd:element name="name">
130
<xsd:restriction base="xsd:string">
131
<xsd:enumeration value="caldera_linux"/>
132
<xsd:enumeration value="mandrake_linux"/>
133
<xsd:enumeration value="palmos"/>
134
<xsd:enumeration value="psos"/>
135
<xsd:enumeration value="redhat_linux"/>
136
<xsd:enumeration value="solaris"/>
137
<xsd:enumeration value="suse_linux"/>
138
<xsd:enumeration value="symbianos"/>
139
<xsd:enumeration value="turbo_linux"/>
140
<xsd:enumeration value="windows"/>
141
<xsd:enumeration value="vxworks"/>
145
<xsd:element name="version" type="xsd:string"/>
149
<xsd:complexType name="TestAttribute">
152
Test attributes encode test-specific settings that we might want recorded.
153
The motivation for inclusion in the COF is the desire to record locale as
154
set by a test, time zone as set by a test, and the use of the Java command
155
line switches like -client, -server, -d32, or -d64. It is expected that
156
the absence of any use of -client or -server will be reflected by an absence
157
of a TestAttribute element whose name is "client" or "server", respectively.
158
Tests that use both flags should create an element for each setting.
159
Similar considerations govern use of "d32" and "d64".
162
Locale values should be in the usual Java format of strings separated by
163
underscores. For instance, ja, ja_JP, and ja_JP_custom are all valid.
164
Locale values should be in the usual Java format of strings separated
165
by underscores. For instance, ja, ja_JP, and ja_JP_custom are all valid.
166
The first string is a valid ISO Language Code and the second is a valid
167
ISO Country Code. The list of language and country codes are at
168
http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt and
169
http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html ,
170
respectively. The third string in the concatenation is for variants
171
and can contain underscores.
174
Time zone values document the time zone used for a particular test or
175
test case. Time zones should be in the format used by Java. For instance, the
176
string for Pacific Standard Time is "America/Los Angeles". The list of
177
supported time zones is obtained by invoking java.util.TimeZone.getAvailableIDs.
178
Do not use a deprecated three-letter time zone ID.
181
In general, a Java command line flag argument that it is agreed will get tracked as
182
an attribute, say -foo,will get tracked by a test attribute <name>foo</name>
183
without a corresponding value element. A Java command line argument pair
184
"-foo bar" will get tracked by a test attribute <name>foo</name><value>bar</value>.
188
<xsd:element name="name" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
189
<xsd:element name="value" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
193
<xsd:complexType name="TestAttributes">
195
<xsd:element name="attribute" type="TestAttribute" minOccurs="1" maxOccurs="unbounded"/>
199
<xsd:complexType name="Status">
202
Status can be one of pass, fail, vm_fail, error, did_not_run, or ambiguous.
203
Fail is for test failures that the test or test case anticipates. A vm_fail
204
status indicates that a VM failure caused the failure. An example of this is
205
a HotSpot abort. An error status can be used to cover all failures not
206
explained as a test or vm failure. Examples are seg faults in the VM or
210
Status did_not_run is an odd one. It's there because test execution may
211
conditional on the successful completion of a setup step, itself a test.
214
The setting ambiguous is the least self-explanatory of the status codes.
215
I18n tests are run in locales that they do not support. These tests fail,
216
but there failure has no meaning that should get reported back to product
220
Expected elements contain text that refers to an expected value. This
221
can be anything. A header, value, body, ..... If the tag log appears,
222
it may be understood that a URL of a log file will appear as the PCDATA
223
for this tag. If present, that URL uses either http or file protocol. If
224
http protocol, the server name will be fully qualified. If file protocol,
225
the full path beginning with /net will be expected. Microsoft file mapping or
226
Unix automounts should not be used.
229
Actual elements contain text that refers to an actual value. This
230
can be anything. A header, value, body, ..... If the tag log appears,
231
it may be understood that a URL of a log file will appear as the PCDATA
232
for this tag. If present, that URL uses either http or file protocol. If
233
http protocol, the server name will be fully qualified. If file protocol,
234
the full path beginning with /net will be expected. Microsoft file mapping or
235
Unix automounts should not be used.
238
<xsd:sequence minOccurs="0" maxOccurs="1">
239
<xsd:element name="expected" type="xsd:string" minOccurs="0" maxOccurs="1"/>
240
<xsd:element name="actual" type="xsd:string" minOccurs="0" maxOccurs="1"/>
242
<xsd:attribute name="value" use="required">
244
<xsd:restriction base="xsd:string">
245
<xsd:enumeration value="pass"/>
246
<xsd:enumeration value="fail"/>
247
<xsd:enumeration value="ambiguous"/>
248
<xsd:enumeration value="error"/>
249
<xsd:enumeration value="vm_fail"/>
250
<xsd:enumeration value="did_not_run"/>
256
<xsd:complexType name="TestCase" abstract="false">
259
Testcase elements define the test cases of a test that are
260
exercised in the course of a run. The id
261
for a test takes the form test_case_name:unique_id. The information
262
will be gathered using the test_coverage.xml file associated with the test case,
263
if present. The unique_id is unique within the xml file. The unique_id portion
264
is present because test run might contain repetitions.
265
Testcases are often tests run with different command line arguments or
266
environments. Often, the different test cases in a test are in reality
267
different methods inside that test's source code.
270
The starttime and endtime fields use an XML format. Times are in UTC (like
271
those that java.util.Date works with). An acceptable dateTime
272
format is yyyy-mm-ddThh:mm:ss.ff. DateTime format is specified in
273
section 5.4 of ISO 8601.
277
<xsd:element name="name" type="xsd:string"/>
278
<xsd:element name="status" type="Status" minOccurs="0" maxOccurs="1"/>
279
<xsd:element name="starttime" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
280
<xsd:element name="endtime" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
281
<xsd:element name="attributes" type="TestAttributes" minOccurs="0" maxOccurs="1"/>
282
<xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
284
<xsd:attribute name="id" type="IDWithColon" use="required"/>
287
<xsd:complexType name="TestCases" abstract="false">
289
<xsd:element name="testcase" type="TestCase" minOccurs="1" maxOccurs="unbounded"/>
293
<xsd:complexType name="Test" abstract="false">
296
Test elements define all the tests exercised by the test suite. The id
297
for a test takes the form test_name:unique_id. The information
298
will be gathered using the test_coverage.xml file associated with the test,
299
if present. The unique_id is unique within the xml file. The unique_id portion
300
is present because test run might contain repetitions.
303
Status is required if there are zero test cases.
304
Starttime is required if there are zero test cases.
305
Endtime is required if there are zero test cases.
306
The starttime and endtime fields use an XML format. Times are in UTC (like
307
those that java.util.Date works with). An acceptable dateTime
308
format is yyyy-mm-ddThh:mm:ss.ff. DateTime format is specified in
309
section 5.4 of ISO 8601.
313
<xsd:element name="name" type="xsd:string"/>
314
<xsd:element name="appuse" type="IDWithColon" minOccurs="0" maxOccurs="unbounded"/>
315
<xsd:element name="status" type="Status" minOccurs="0" maxOccurs="1"/>
316
<xsd:element name="testcases" type="TestCases" minOccurs="0" maxOccurs="1"/>
317
<xsd:element name="starttime" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
318
<xsd:element name="endtime" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
319
<xsd:element name="keywords" type="KeyWords" minOccurs="0" maxOccurs="1"/>
320
<xsd:element name="attributes" type="TestAttributes" minOccurs="0" maxOccurs="1"/>
321
<xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
323
<xsd:attribute name="id" type="IDWithColon" use="required"/>
326
<xsd:complexType name="Tests" abstract="false">
328
<xsd:element name="test" type="Test" minOccurs="1" maxOccurs="unbounded"/>
332
<xsd:complexType name="TestSuite" abstract="false">
335
Test suite elements contain the test suite name. The name must be the same
336
as one defined in the test_coverage.xml file, if that file is defined.
337
The id element for a suite takes the form test_suite:unique_id. The information
338
will be gathered using the test_coverage.xml file associated with the test
339
suite, if present. The unique_id is unique within the xml file. The
340
unique_id portion is present because test run might contain repetitions.
343
The version field uses an XML format. Times are in UTC (like
344
those that java.util.Date works with). An acceptable dateTime
345
format is yyyy-mm-ddThh:mm:ss.ff. DateTime format is specified in
346
section 5.4 of ISO 8601.
349
The starttime and endtime fields use an XML format. Times are in UTC (like
350
those that java.util.Date works with). An acceptable dateTime
351
format is yyyy-mm-ddThh:mm:ss.ff. DateTime format is specified in
352
section 5.4 of ISO 8601.
356
<xsd:element name="name" type="xsd:string"/>
357
<xsd:element name="version" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
358
<xsd:element name="starttime" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
359
<xsd:element name="endtime" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
360
<xsd:element name="tests" type="Tests" minOccurs="1" maxOccurs="unbounded"/>
362
<xsd:attribute name="id" type="IDWithColon" use="required"/>
365
<xsd:complexType name="TestSuites" abstract="false">
367
<xsd:element name="testsuite" type="TestSuite" minOccurs="1" maxOccurs="unbounded"/>
371
<xsd:complexType name="Environment">
374
Software configurations are a way to document the software environment used
378
Machines are identified by name, not Internet address. The name must be
379
fully qualified. Hardware configuration is obtained with a combination of
383
Locale documents the default locale for the test run. Locale values should be
384
in the usual Java format of strings separated by underscores. For instance, ja,
385
ja_JP, and ja_JP_custom are all valid. The first string is a valid ISO
386
Language Code and the second is a valid ISO Country Code. The list of
387
language and country codes are at
388
http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt and
389
http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html ,
390
respectively. The third string in the concatenation is for variants
391
and can contain underscores.
394
System-locale is that used by the OS to configure OS applications. On Windows
395
systems, system-locale is attached to the OS and cannot be changed.
396
User-locale is that used by the Java API. It is the setting reported out by
397
java.util.Locale.getDefault().
400
Time zone elements document the default time zone for the test run.
401
Time zones should be in the format used by Java. For instance, the
402
string for Pacific Standard Time is "America/Los Angeles". The list of
403
supported time zones is obtained by invoking java.util.TimeZone.getAvailableIDs.
404
Do not use a deprecated three-letter time zone ID.
407
JDK elements use the property java.runtime.version.
411
<xsd:element name="machine" type="Machine"/>
412
<xsd:element name="os" type="OS"/>
413
<xsd:element name="jdk" type="xsd:string" minOccurs="0" maxOccurs="1"/>
414
<xsd:element name="system-locale" type="xsd:string" minOccurs="0" maxOccurs="1"/>
415
<xsd:element name="user-locale" type="xsd:string" minOccurs="0" maxOccurs="1"/>
416
<xsd:element name="timezone" type="xsd:string" minOccurs="0" maxOccurs="1"/>
417
<xsd:element name="bits" type="Bits" minOccurs="0" maxOccurs="1"/>
418
<xsd:element name="displaydepth" type="DisplayDepth" minOccurs="0" maxOccurs="1"/>
419
<xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
420
<xsd:element name="sw" type="SWEntity" minOccurs="0" maxOccurs="unbounded"/>
422
<xsd:attribute name="id" type="IDWithColon" use="required"/>
425
<xsd:complexType name="Environments">
427
<xsd:element name="environment" type="Environment" minOccurs="1" maxOccurs="unbounded"/>
431
<xsd:complexType name="SWEntity">
434
Software is tracked in the hardware/software database that backs up
435
the COF XML. The elements in the SW type map to fields in the software
436
table of that database.
437
Type is enumerated. See below.
438
Name is a product name with no version string. For example, "Tomcat".
439
Version is a product version. For instance, "8i".
443
<xsd:element name="type">
445
<xsd:restriction base="xsd:string">
446
<xsd:enumeration value="appserver"/>
447
<xsd:enumeration value="browser"/>
448
<xsd:enumeration value="database"/>
449
<xsd:enumeration value="editor"/>
450
<xsd:enumeration value="java"/>
451
<xsd:enumeration value="webserver"/>
455
<xsd:element name="name" type="xsd:string"/>
456
<xsd:element name="version" type="xsd:string" minOccurs="0" maxOccurs="1"/>
457
<xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
459
<xsd:attribute name="id" type="IDWithColon" use="required"/>
462
<xsd:complexType name="SWEntities" abstract="false">
464
<xsd:element name="swentity" type="SWEntity" minOccurs="1" maxOccurs="unbounded"/>
468
<xsd:complexType name="Application" abstract="false">
469
<xsd:attribute name="id" type="IDWithColon" use="required"/>
470
<xsd:attribute name="environmentid" type="IDWithColon" use="required"/>
471
<xsd:attribute name="swentityid" type="IDWithColon" use="required"/>
474
<xsd:complexType name="Applications" abstract="false">
476
<xsd:element name="application" type="Application" minOccurs="1" maxOccurs="unbounded"/>
480
<xsd:complexType name="Report" abstract="false">
483
The version is the common XML output version. The first version will be 1.0.
484
The date fields use an XML format. Times are in UTC (like
485
those that java.util.Date works with). An acceptable dateTime
486
format is yyyy-mm-ddThh:mm:ss.ff. DateTime format is specified in
487
section 5.4 of ISO 8601.
491
<xsd:element name="date" type="xsd:dateTime"/>
492
<xsd:element name="version" type="xsd:string"/>
493
<xsd:element name="environments" type="Environments"/>
494
<xsd:element name="swentities" type="SWEntities" minOccurs="0" maxOccurs="1"/>
495
<xsd:element name="applications" type="Applications" minOccurs="0" maxOccurs="unbounded"/>
496
<xsd:element name="operator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
497
<xsd:element name="harness" type="xsd:string" minOccurs="0" maxOccurs="1"/>
498
<xsd:element name="testsuites" type="TestSuites" minOccurs="1" maxOccurs="unbounded"/>
499
<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
503
<xsd:element name="report" type="Report">
504
<xsd:key name="EnvironmentKey">
505
<xsd:selector xpath="report/environments/environment"/>
506
<xsd:field xpath="@id"/>
508
<xsd:keyref name="RefToEnvironment" refer="EnvironmentKey">
509
<xsd:selector xpath="report/applications/application"/>
510
<xsd:field xpath="@environmentid"/>
513
<xsd:key name="SWEntityKey">
514
<xsd:selector xpath="report/swentities/swentity"/>
515
<xsd:field xpath="@id"/>
517
<xsd:keyref name="RefToSWEntity" refer="SWEntityKey">
518
<xsd:selector xpath="report/applications/application"/>
519
<xsd:field xpath="@swentityid"/>
522
<xsd:key name="ApplicationKey">
523
<xsd:selector xpath="report/applications/application"/>
524
<xsd:field xpath="@id"/>
526
<xsd:keyref name="RefToApplication" refer="ApplicationKey">
527
<xsd:selector xpath="report/testsuites/testsuite/tests/test/appuse"/>
528
<xsd:field xpath="@id"/>
531
<xsd:unique name="UniqueTestSuiteID">
532
<xsd:selector xpath="report/testsuites/testsuite"/>
533
<xsd:field xpath="@id"/>
536
<xsd:unique name="UniqueTestID">
537
<xsd:selector xpath="report/testsuites/testsuite/tests/test"/>
538
<xsd:field xpath="@id"/>
541
<xsd:unique name="UniqueTestCaseID">
542
<xsd:selector xpath="report/testsuites/testsuite/tests/test/testcases/testcase"/>
543
<xsd:field xpath="@id"/>