for (Map.Entry<String, Collection<UnitTest>> testSuite : _testsByClass.entrySet()) {
final String suite = baseSuite + '.' + testSuite.getKey();
final String path = getOutputDir() + File.separatorChar + "TEST-" + suite + ".xml";
final XMLStreamWriter out = writerFactory.createXMLStreamWriter(new FileOutputStream(path));
out.writeStartDocument();
out.writeComment("Generated by " + getClass().getName());
out.writeStartElement("testsuite");
out.writeAttribute("hostname", getHostName(testSuite.getValue()));
out.writeAttribute("name", suite);
out.writeAttribute("tests", Integer.toString(testSuite.getValue().size()));
out.writeAttribute("errors", Integer.toString(getErrors(testSuite.getValue())));