private void generateMethodDetails(List<ISuite> suites) throws IOException { html.h1().content("Test Method Details"); for (ISuite suite : suites) { Map<String, ISuiteResult> r = suite.getResults(); for (ISuiteResult r2 : r.values()) { ITestContext testContext = r2.getTestContext(); generateDetail(testContext.getFailedTests()); generateDetail(testContext.getSkippedTests()); generateDetail(testContext.getPassedTests()); } } }
private String buildHtml() { HtmlCanvas html = new HtmlCanvas(); try { html .head() .title() .content("StreamPipes Connector Worker Container") ._head() .body() .h1().write("Worker Connector Container with ID: " + this.id)._h1() ._body(); } catch (IOException e) { e.printStackTrace(); } return html.toHtml(); } }
private String buildHtml() { HtmlCanvas html = new HtmlCanvas(); try { HtmlCanvas tmp = html .head() .title() .content("StreamPipes Connector Master Container") ._head() .body() .h1().write("Connector Master Container")._h1() .h2().write("All Running Adapters")._h2() .ol(); tmp = getAllRunningAdapters(tmp); html = tmp._ol() ._body(); } catch (IOException e) { logger.error("Error in SP Connect Master Container: ", e); } return html.toHtml(); }
void generateHeader(HtmlCanvas reportPageBody, String cloudSlangImage) throws IOException { HtmlCanvas headerDiv = reportPageBody.div(new HtmlAttributes().id(HEADER_BAR_ID)); HtmlCanvas anchor = headerDiv.a(new HtmlAttributes().href(HTTP_CLOUD_SLANG_IO).target(BLANK)); HtmlCanvas img = new HtmlCanvas().img(new HtmlAttributes().src(cloudSlangImage).alt(CLOUD_SLANG_LOGO_ALT)); anchor.content(img.toHtml(), false); headerDiv._div(); reportPageBody.h1(new HtmlAttributes().class_(REPORT_TITLE_CLASS)).content(TEST_CASE_REPORT); }
@SuppressWarnings("unchecked") protected void generateHTMLReport() throws IOException, SecurityException { html = new HtmlCanvas(); html.html().head(); writeCss(); html.title().content(title + ": Test Cases Coverage Report")._head().body(); html.h1().content("W3C Linked Data Platform (" + title + ") Test Suite: Test Cases Coverage Report"); html.p().a(href("http://www.w3.org/2012/ldp/")).content("See also W3C Linked Data Platform WG")._p(); html.p().a(href(specUri)).content("Specification Requirements Page")._p(); final String commit = BuildProperties.getRevision(); if (commit != null) { html.div() .write("Test Suite Revision: ") .a(href("https://github.com/w3c/ldp-testsuite/commit/" + commit)).content(commit)._div(); } DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.ENGLISH); html.div().content("Updated: " + dateFormat.format(new Date())); // Generate the summary diagrams and information createSummaryReport(); toTop(); // Go through all the classes and generate details of each test case for (@SuppressWarnings("rawtypes") Class testcaseClass: testClasses) { writeTestCasesForClass(testcaseClass); } }
private void makeMethodsList(ITestContext testContext) throws IOException { IResultMap failed = testContext.getFailedTests(); IResultMap passed = testContext.getPassedTests(); IResultMap skipped = testContext.getSkippedTests(); html.h1(class_("center")).content("Methods called"); html.a(href("#Skipped")).write("Go To Skipped Tests").br()._a(); html.a(href("#Passed")).write("Go To Passed Tests").br()._a(); html.a(href("#Indirect")).write("Go To Indirect Tests").br()._a(); html.br(); makeMethodSummaryTable(failed, "Failed"); html.br(); toTop(); html.br(); makeMethodSummaryTable(skipped, "Skipped"); html.br(); toTop(); html.br(); makeMethodSummaryTable(passed, "Passed"); html.br(); toTop(); makeIndirectSummaryTable(); html.br(); }
html.title().content(LdpTestSuite.NAME + " Report")._head() .body(); html.h1().content(LdpTestSuite.NAME + " Summary");