Litmus:Test Result Format DTD
Jump to navigation
Jump to search
This is the DTD that is used to validate test result submissions submitted to Litmus via the web service:
<!ELEMENT litmusresults (testresults)>
<!ATTLIST litmusresults useragent CDATA #REQUIRED>
<!ATTLIST litmusresults machinename CDATA>
<!ATTLIST litmusresults action (validate|submit) "validate">
<!ELEMENT testresults (result+ log*)>
<!ATTLIST testresults username CDATA #REQUIRED>
<!ATTLIST testresults authtoken CDATA #REQUIRED>
<!ATTLIST testresults product CDATA #REQUIRED>
<!ATTLIST testresults platform CDATA #REQUIRED>
<!ATTLIST testresults opsys CDATA #REQUIRED>
<!ATTLIST testresults branch CDATA #REQUIRED>
<!ATTLIST testresults buildid CDATA #REQUIRED>
<!ATTLIST testresults buildtype CDATA>
<!ATTLIST testresults locale CDATA #REQUIRED>
<!ELEMENT log (#PCDATA)>
<!ATTLIST log logtype CDATA #REQUIRED>
<!ELEMENT result (comment?,bugnumber*,log*)>
<!ATTLIST result is_automated_result (0|1) "1">
<!ATTLIST result testid CDATA #REQUIRED>
<!ATTLIST result resultstatus CDATA #REQUIRED>
<!ATTLIST result exitstatus CDATA>
<!ATTLIST result duration CDATA>
<!ATTLIST result timestamp CDATA>
<!ELEMENT comment (#PCDATA)>
<!ELEMENT bugnumber (#PCDATA)>
<!ELEMENT log (#PCDATA)>
<!ATTLIST log logtype CDATA #REQUIRED>
Where authtoken is the user's secure test automation token.
Here is an example of a a fully-formed XML result submission:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE litmusresults
PUBLIC
"-//Mozilla Corporation//Litmus Result Submission DTD//EN/"
"http://litmus.mozilla.org/litmus_results.dtd">
<litmusresults action="validate" useragent="SuperDuperTestingTool/1.0 (machine foobar)" machinename="foobar">
<testresults username="ccooper@domain.name"
authtoken="fuzzyfingers"
product="Firefox"
platform="Linux"
opsys="Linux"
branch="Trunk"
buildid="2005110712"
locale="en-US">
<log logtype="STDOUT"><![CDATA[Log data goes here that applies to the entire collection of results. Any logs here will be linked with each result submitted.]]</log>
<result testid="44"
is_automated_result="1"
resultstatus="pass"
exitstatus="0"
duration="666"
timestamp="20051111150944">
<comment>This test was successful.</comment>
<bugnumber>300000</bugnumber>
<bugnumber>300005</bugnumber>
<bugnumber>300010</bugnumber>
<log logtype="STDOUT"><![CDATA[
Random (potentially malformed) log file goes here.<br> This log data should be specific to the current test result, and will be linked only with that result.
]]>
</log>
</result>
</testresults>
</litmusresults>