writer.print("<title>" + title + "</title></head>");
writer.print("<body>");
writer.print("<table class='results'>");
writer.print("<tr><td class='title'>" + title + "<br />" + new Date() + "</td>");
for (Iterator iterator = servers.iterator(); iterator.hasNext();) {
Server server = (Server) iterator.next();
writer.print("<td class='server'>" + server.getName() + "<br />" + server.getVersion() + "</td>");
}
writer.print("</tr>");
String lastTestClass = "";
for (Iterator i1 = tests.iterator(); i1.hasNext();) {
Test test = (Test) i1.next();
String testName = test.toString();
String testClass = testName.substring(testName.indexOf('(') + 1, testName.indexOf(')'));
String testMethod = testName.substring(0, testName.indexOf('('));
if (!lastTestClass.equals(testClass)) {
writer.print("<tr><td class='testClass' colspan='" + (servers.size() + 1) + "'>"
+ testClass.substring(testClass.lastIndexOf('.') + 1).replaceAll("[A-Z]", " $0").trim() + "</td></tr>");
lastTestClass = testClass;
}
writer.print("<tr><td class='testMethod'>"
+ testMethod.substring(4).replaceAll("[A-Z]", " $0").toLowerCase() + "</td>");
for (Iterator i2 = servers.iterator(); i2.hasNext();) {
Server server = (Server) i2.next();
String error = (String) results.get(new Tuple(server, test));
if (error == null) {
writer.print("<td class='pass'>pass</td>");
} else {
writer.print("<td class='fail' title=\"" + TextUtils.htmlEncode(error)+ "\">FAIL</td>");