| 12170 | } |
| 12171 | |
| 12172 | void JunitReporter::writeGroup(TestGroupNode const &groupNode, double suiteTime) { |
| 12173 | XmlWriter::ScopedElement e = xml.scopedElement("testsuite"); |
| 12174 | TestGroupStats const &stats = groupNode.value; |
| 12175 | xml.writeAttribute("name", stats.groupInfo.name); |
| 12176 | xml.writeAttribute("errors", unexpectedExceptions); |
| 12177 | xml.writeAttribute("failures", stats.totals.assertions.failed - unexpectedExceptions); |
| 12178 | xml.writeAttribute("tests", stats.totals.assertions.total()); |
| 12179 | xml.writeAttribute("hostname", "tbd"); // !TBD |
| 12180 | if (m_config->showDurations() == ShowDurations::Never) |
| 12181 | xml.writeAttribute("time", ""); |
| 12182 | else |
| 12183 | xml.writeAttribute("time", suiteTime); |
| 12184 | xml.writeAttribute("timestamp", getCurrentTimestamp()); |
| 12185 | |
| 12186 | // Write test cases |
| 12187 | for (auto const &child : groupNode.children) |
| 12188 | writeTestCase(*child); |
| 12189 | |
| 12190 | xml.scopedElement("system-out").writeText(trim(stdOutForSuite), false); |
| 12191 | xml.scopedElement("system-err").writeText(trim(stdErrForSuite), false); |
| 12192 | } |
| 12193 | |
| 12194 | void JunitReporter::writeTestCase(TestCaseNode const &testCaseNode) { |
| 12195 | TestCaseStats const &stats = testCaseNode.value; |
nothing calls this directly
no test coverage detected