private static void iterateTableList(HashMap<String, String> list) throws IOException { String className; String methodName; Iterator<Entry<String, String>> codeIter = list.entrySet().iterator(); while(codeIter.hasNext()){ Entry<String, String> entry = codeIter.next(); className = entry.getValue(); className = className.substring(className.lastIndexOf(".") + 1); methodName = entry.getKey(); String normalizedName = AbstractEarlReporter.createTestCaseName(className, methodName); html.li().a(href("#" + methodName)).b().write(normalizedName)._b()._a()._li(); } }
private static void generateList(ArrayList<String> list) throws IOException { if(list.size() == 0) { html.p().content("No tests of this type found."); } else { html.ul(); for (int i = 0; i < list.size(); i++) { html.li().a(href("#" + list.get(i))).write(list.get(i))._a()._li(); } html._ul(); } }
private void writeIndirectCases() throws IOException { if(indirectCases.size() == 0){ html.p().b().write("No Indirect Test Cases.")._b()._p(); } else { html.ul(); for (Method method : indirectCases) { if (method.getAnnotation(SpecTest.class) != null) { String name = method.getDeclaringClass().getCanonicalName(); name = name.substring(name.lastIndexOf(".") + 1); String normalizedName = AbstractEarlReporter.createTestCaseName(name, method.getName()); html.li().a(href("#" + method.getName())).b().write(normalizedName)._b()._a()._li(); } } html._ul(); } }
private HtmlCanvas getAllRunningAdapters(HtmlCanvas canvas) throws IOException { List<AdapterDescription> allAdapterDescriptions = null; try { allAdapterDescriptions = this.adapterMasterManagement.getAllAdapters(new AdapterStorageImpl()); } catch (AdapterException e) { logger.error("Could not connect to couchdb on URL: " + CouchDbConfig.INSTANCE.getHost(), e); canvas.li().write("Error while connecting to CouchDB on Host: " + CouchDbConfig.INSTANCE.getHost())._li(); return canvas; } for (AdapterDescription ad : allAdapterDescriptions) { canvas.li().write(ad.getAdapterId())._li(); canvas.ul().li().write("Kafka Topic: " + GroundingService.extractTopic(ad))._li()._ul(); } return canvas; }
private void writeSteps(String[] steps, String title) throws IOException { html.p().content("How to Run " + title); html.ul(); for(String step : steps) html.li().content(step); html._ul(); }
private static void writeSteps(String[] steps, String title) throws IOException { html.p().content("How to Run " + title); html.ul(); for(String step : steps) html.li().content(step); html._ul(); }
@Override public void renderOn(HtmlCanvas html) throws IOException { html.li().a(href(subMenuLink)).write(subMenuElement)._a()._li(); }
private static void writeGraphDescription() throws IOException { html.h3().content("Description of the Chart Information"); html.h4().content("Test Status"); html.ul(); html.li().b().write("Approved")._b().write(" - the working group has approved this test case")._li(); html.li().b().write("Pending approval")._b().write(" (default) - no official recommendation from the working group supporting the specification being tested by this test suite")._li(); html.li().b().write("Extension")._b().write(" - valuable test case but not part of the approved set")._li(); html.li().b().write("Deprecated")._b().write(" - no longer recommended by the working group")._li(); html.li().b().write("Clarification")._b().write(" - requires further clarification from the working group")._li(); html._ul(); html.h4().content("Test Implementation"); html.ul(); html.li().b().write("Automated")._b().write(" - implementation complete")._li(); html.li().b().write("Not Implemented")._b().write(" (default) - possible to implement, just not done")._li(); html.li().b().write("Client Only")._b().write(" - test is only client-side, this test suite doesn't test it")._li(); html.li().b().write("Manual")._b().write(" - server test but not automated")._li(); html._ul(); }
private void updateMenu(File htmlFile, List<SubMenuReplacement> subMenuReplacements) throws IOException, MojoExecutionException { if (subMenuReplacements == null || subMenuReplacements.isEmpty()) return; for (SubMenuReplacement subMenuReplacement : subMenuReplacements) { HtmlCanvas html = new HtmlCanvas(); html .li(class_("dropdown-submenu")) .a(href(subMenuReplacement.getOriginalMenuElementLink())).write(subMenuReplacement.getOriginalMenuElement())._a() .ul(class_("dropdown-menu")); if (subMenuReplacement.getSubMenuElements() != null) { for (String subMenuElement : subMenuReplacement.getSubMenuElements().keySet()) { html.render(new SubMenuElement(subMenuElement, subMenuReplacement.getSubMenuElements().get(subMenuElement))); } } html ._ul() ._li(); replaceByLine(htmlFile, "<li.*><a href=.*>" + subMenuReplacement.getOriginalMenuElement() + "</a></li>", formatHtml(html.toHtml())); } }
private void generateList(String[] list, String title) throws IOException { html.h2().write(title)._h2(); if (list.length == 0) { html.div(style("padding-left:2em")).i() .content("No groups of this type found in the test suite") ._div(); } else { html.ul(); for (String group : list) { html.li().content(group); } html._ul(); } }
String testCaseName = methodName.getDeclaringClass().getSimpleName(); String normalizedName = AbstractEarlReporter.createTestCaseName(testCaseName, methodName.getName()); html.li().b().write(normalizedName)._b(); html.write(" - [Test " + findTestResult(methodName.getName()) + "]"); html._li();
html.li(id(method.getName())); html.b(); html.a(href(ReportUtils.getJavadocLink(method))) testCaseName = testCaseName.substring(testCaseName.lastIndexOf(".") + 1); String normalizedName = AbstractEarlReporter.createTestCaseName(testCaseName, m.getName()); html.li().a(href("#" + m.getName())).b().write(normalizedName)._b()._a()._li();
html.li(); writeColorBlock(statusColor, "approved"); html.b().write(approved + " ")._b().write("Approved"); html._li(); html.li(); writeColorBlock(statusColor, "pending"); html.b().write(pending + " ")._b().write("Pending"); html._li(); html.li(); writeColorBlock(statusColor, "extends"); html.b().write(extended + " ")._b().write("Extension"); html._li(); html.li(); writeColorBlock(statusColor, "deprecated"); html.b().write(deprecated + " ")._b().write("No longer valid"); html._li(); html.li(); writeColorBlock(statusColor, "clarify"); html.b().write(clarification + " ")._b().write("Needs to be clarified with WG"); .write(" of Tests Possible to Automate"); html.ul(); html.li().b().write("" + refURI.size())._b().write(" Requirements Covered") ._li(); html.ul().li().b().write("" + mustTotal)._b().write(" MUST")._li();
private HtmlCanvas addMergeRequest(HtmlCanvas html, MergeRequest mergeRequest) throws IOException { MutableDataSet options = new MutableDataSet(); Parser parser = Parser.builder(options).build(); HtmlRenderer renderer = HtmlRenderer.builder(options).build(); String description = mergeRequest.getDescription(); description = renderer.render(parser.parse(description)); return html.li().h5().write(mergeRequest.getTitle() + " ").a(href(gitlabRepository + "/merge_requests/"+mergeRequest.getIid()).class_("external")).write("#"+mergeRequest.getIid())._a()._h5().write(description, false)._li(); }
private HtmlCanvas addIssue(HtmlCanvas html, Issue issue) throws IOException { MutableDataSet options = new MutableDataSet(); Parser parser = Parser.builder(options).build(); HtmlRenderer renderer = HtmlRenderer.builder(options).build(); String description = issue.getDescription(); description = renderer.render(parser.parse(description)); return html.li().h5().write(issue.getTitle() + " ").a(href(gitlabRepository + "/issues/"+issue.getIid()).class_("external")).write("#"+issue.getIid())._a()._h5().write(description, false)._li(); }