<testcase>
XML node in format compatible with Jenkins unit tests.
# Return a `<testcase>` XML node in format compatible with Jenkins unit tests.
fun to_xml: HTMLTag do
var tc = new HTMLTag("testcase")
tc.attr("classname", xml_classname)
tc.attr("name", xml_name)
tc.attr("time", real_time.to_s)
var output = self.raw_output
if output != null then output = output.trunc(8192).filter_nonprintable
var error = self.error
if error != null then
var node
if was_exec then
node = tc.open("error").attr("message", error)
else
node = tc.open("failure").attr("message", error)
end
if output != null then
node.append(output)
end
else if output != null then
tc.open("system-err").append(output)
end
return tc
end
src/testing/testing_base.nit:261,2--285,4