86 def __init__(self, testCaseName, package, author, duration, maintainer=None, file=None, line=None, comment=None, showTestFunctionSortingLiterals=False):
87 assert(isinstance(testCaseName, str))
92 commonAttributes = {
"name": str(testCaseName),
93 "type":
"FunctionalTestCase"}
95 self.
_xml = etree.Element(
"ExtraTestCaseResult")
97 information = etree.SubElement(self.
_xml,
"Information")
98 testCaseInfo = etree.SubElement(information,
"TestCase")
99 infoAttributes = {
"timeout":
"0"}
100 infoAttributes.update(commonAttributes)
101 for key
in infoAttributes:
102 testCaseInfo.set(key, infoAttributes[key])
103 etree.SubElement(testCaseInfo,
"Author").text = str(author)
104 etree.SubElement(testCaseInfo,
"Package").text = str(package)
105 etree.SubElement(testCaseInfo,
"Maintainer").text = str(maintainer)
if maintainer
else ""
106 etree.SubElement(testCaseInfo,
"Comment").text = str(comment)
if comment
else ""
107 etree.SubElement(testCaseInfo,
"File").text = str(file)
if file
else ""
108 etree.SubElement(testCaseInfo,
"Line").text = str(line)
if line
else ""
109 etree.SubElement(testCaseInfo,
"showTestFunctionSortingLiterals").text =
"1" if showTestFunctionSortingLiterals
else "0"
113 result = etree.SubElement(self.
_xml,
"Result")
115 resultAttributes = {
"retries":
"0",
116 "duration": str(duration)}
117 resultAttributes.update(commonAttributes)
118 for key
in resultAttributes: