private void appendTestRunRowToTable(HtmlCanvas table, TestRun testRun, SlangTestCase testCase, String result) throws IOException { table.tr().td().content(testCase.getName()) .td(getClass(TEST_SUITES_CSS_CLASS)).content(getTestSuites(testCase)) .td(getClass(STATUS_CSS_CLASS)).content(result) .td().content(testCase.getTestFlowPath()) .td().content(testCase.getDescription()) .td().content(getOutputs(testCase)) .td().content(testRun.getMessage()) ._tr(); }
@Override public void renderOn(HtmlCanvas html) throws IOException { HtmlCanvas tbody = html .table(class_("table table-condensed")) .tbody(); for (File file : files) { tbody .tr() .td(class_(tdClass)).content(root.relativize(file.toPath()).toString()) ._tr(); } tbody ._tbody() ._table(); } }
@Override public void renderOn(HtmlCanvas html) throws IOException { HtmlCanvas tbody = html .table(class_("table table-condensed")) .tbody(); for (File file : files) { tbody .tr() .td(class_(tdClass)).content(root.relativize(file.toPath()).toString()) ._tr(); } tbody ._tbody() ._table(); } }
/** * Render error reporting information using the (debug) html * @param html * @throws IOException */ public void renderForErrorOn(HtmlCanvas html) throws IOException { html.h3().write(this.getClass().getName())._h3(); html.table(border("1px").cellpadding("4px")); for (String key : attributes.keySet()) { Object value = attributes.get(key); html .tr() .td().write(key)._td() .td().write(value.toString())._td() ._tr(); } html._table(); } @Override
String normalizedName = AbstractEarlReporter.createTestCaseName( method.getTestClass().getName(), method.getMethodName()); html.td() .a(href("#" + method.getTestClass().getName() + "_" + method.getMethodName())).write(normalizedName)._a()._td(); html.td(class_("Failed")).content(FAIL); else if(result.contains(PASS) && !result.contains(FAIL)) html.td(class_("Passed")).content(PASS); else if(result.contains(SKIP) && !result.contains(FAIL) && !result.contains(PASS)) html.td(class_("Skipped")).content(SKIP); html.td().content( (method.getDescription() != null ? method.getDescription() : "No Description found"));
private void generateSummaryTableStart(Date date, String suiteName) throws IOException { html.tr().th().content("Test Suite Name"); html.th().content("Revision"); html.th().content("Report Date"); html.th().content("Skipped Tests"); html.th().content("MUST Requirements"); html.th().content("SHOULD Requirements"); html.th().content("MAY Requirements"); html._tr(); html.tr(class_("alt")).td().content(suiteName); final String commit = BuildProperties.getRevision(); if (commit == null) { html.td().content("<UNKNOWN>"); } else { html.td().a(href("https://github.com/w3c/ldp-testsuite/commit/" + commit)).content(commit)._td(); } html.td().content(date.toString()); }
private void createSkipExceptionTable(Throwable thrown) throws IOException { html.table(class_("indented")); html.tr(class_("center")).th(class_("Skipped")) .content("[SKIPPED TEST]")._tr(); html.tr().td().content(thrown.getMessage())._tr(); html._table(); }
@Override public void renderOn(HtmlCanvas html) throws IOException { HtmlCanvas tbody = html .table(class_("table table-striped table-condensed")) .tbody(); int id = 0; for (Pair<File, File> file : files) { tbody .tr() .td(class_("col-md-10")).content(comparator.getSrc().relativize(file.getFirst().toPath()).toString()) .td(class_("col-md-2")) .a(class_("btn btn-primary btn-xs").href("/diff/" + id)).content("diff") .write(" ") .a(class_("btn btn-primary btn-xs").href("/mergely/" + id)).content("mergely") .write(" ") .a(class_("btn btn-primary btn-xs").href("/script/" + id)).content("script") ._td() ._tr(); id++; } tbody ._tbody() ._table(); }
@Override public void renderOn(HtmlCanvas html) throws IOException { HtmlCanvas tbody = html .table(class_("table table-striped table-condensed")) .tbody(); int id = 0; for (Pair<File, File> file : files) { tbody .tr() .td(class_("col-md-10")).content(comparator.getSrc().relativize(file.getFirst().toPath()).toString()) .td(class_("col-md-2")) .a(class_("btn btn-primary btn-xs").href("/diff/" + id)).content("diff") .write(" ") .a(class_("btn btn-primary btn-xs").href("/mergely/" + id)).content("mergely") .write(" ") .a(class_("btn btn-primary btn-xs").href("/script/" + id)).content("script") ._td() ._tr(); id++; } tbody ._tbody() ._table(); }
html._tr(); html.tr().td().content(total + ""); html.td(); if (must > 0) html.b().write("MUST: ")._b().write(must).br(); html.b().write("MAY: ")._b().write(may).br(); html._td().td(); int approve = getTotal(apprReq); if(approve > 0) html.b().write("Clarification: ")._b().write("" + clarify).br(); html._td().td(); int auto = getTotal(autoReq); if (auto > 0)
private void createThrownTable(Throwable thrown) throws IOException { html.table(class_("indented")); html.tr(class_("center")).th(class_("Failed")).content("[FAILED TEST]") ._tr(); html.tr().td(class_("throw")).content(Utils.stackTrace(thrown, false)[0])._tr(); html._table(); }
private void printReqCellResult(int passed, int failed, int skipped) throws IOException { int total = passed + failed + skipped; html.td().b().write(passed + "/" + total)._b(); html.write(" Passed"); html.br().b().write(failed + "/" + total)._b(); html.write(" Failed"); html.br().b().write(skipped + "/" + total)._b(); html.write(" Skipped"); html._td(); }
/** * Add the table to the HTML canvas ready for rendering * * @param html html canvas * @param tableRows table rows, these should all be the same lenght * @param headers table headers * @param title itle of the table * @throws IOException if IO error occurs */ public void addTable(HtmlCanvas html, List<TableRow> tableRows, List<String> headers, String title) throws IOException { html.h2().content(title); html.table(); html.tr(); for (String header : headers) { html.th().content(header); } html._tr(); int i = 0; for (TableRow row : tableRows) { String clazz = (i % 2 == 0) ? "even" : "odd"; html.tr(class_(clazz)); for (String column : row.getCells()) { html.td().content(column); } html._tr(); i++; } html._table(); }
html.td(rowspan("2")).b().write("" + totalTests)._b().write(" Total Tests"); html.ul(); html._td(); html.td(); html.td(); html.b().write((needCode.size() + clients.size() + manuals.size()) + " ")._b() .write("of the Unimplemented Tests"); html._tr(); html.tr().td(colspan("2").style("text-align:center;")); html.span(class_("chartStart"));