@Override public String getDescription() { return testNGMethod.getDescription(); }
@Override public String getDescription() { return testNGMethod.getDescription(); }
private void generateExcludedMethodsReport(XmlSuite xmlSuite, ISuite suite) { Collection<ITestNGMethod> excluded = suite.getExcludedMethods(); StringBuilder sb2 = new StringBuilder("<h2>Methods that were not run</h2><table>\n"); for (ITestNGMethod method : excluded) { ConstructorOrMethod m = method.getConstructorOrMethod(); if (m != null) { sb2.append("<tr><td>") .append(m.getDeclaringClass().getName()).append(".").append(m.getName()); String description = method.getDescription(); if(isStringNotEmpty(description)) { sb2.append("<br/>").append(SP2).append("<i>").append(description).append("</i>"); } sb2.append("</td></tr>\n"); } } sb2.append("</table>"); Utils.writeFile(getOutputDirectory(xmlSuite), METHODS_NOT_RUN, sb2.toString()); }
private void generateExcludedMethodsReport(XmlSuite xmlSuite, ISuite suite) { Collection<ITestNGMethod> excluded = suite.getExcludedMethods(); StringBuilder sb2 = new StringBuilder("<h2>Methods that were not run</h2><table>\n"); for (ITestNGMethod method : excluded) { ConstructorOrMethod m = method.getConstructorOrMethod(); if (m != null) { sb2.append("<tr><td>") .append(m.getDeclaringClass().getName()) .append(".") .append(m.getName()); String description = method.getDescription(); if (isStringNotEmpty(description)) { sb2.append("<br/>").append(SP2).append("<i>").append(description).append("</i>"); } sb2.append("</td></tr>\n"); } } sb2.append("</table>"); Utils.writeFile(getOutputDirectory(xmlSuite), METHODS_NOT_RUN, sb2.toString()); }
if (! Utils.isStringEmpty(method.getDescription())) { pw.append("<br>").append("Test method: ").append(method.getDescription());
.append("\">"); String description = method.getDescription(); String testInstanceName = resultSet.toArray(new ITestResult[]{})[0].getTestName(); buff.append("<td><a href=\"#m").append(m_methodIndex).append("\">")
sb.append(itr.getEndMillis() - itr.getStartMillis()); sb.append(" ms"); if (!Utils.isStringEmpty(tm.getDescription())) { sb.append("\n"); for (int i = 0; i < identLevel; i++) { sb.append(" "); sb.append(tm.getDescription());
if (!Utils.isStringEmpty(method.getDescription())) { pw.append("<br>").append("Test method: ").append(method.getDescription());
.append("\">"); String description = method.getDescription(); String testInstanceName = resultSet.toArray(new ITestResult[] {})[0].getTestName(); buff.append("<td><a href=\"#m")
sb.append(itr.getEndMillis() - itr.getStartMillis()); sb.append(" ms"); if (!Utils.isStringEmpty(tm.getDescription())) { sb.append("\n"); for (int i = 0; i < identLevel; i++) { sb.append(" "); sb.append(tm.getDescription());
private void logResult(String status, ITestResult tr, String stackTrace) { logResult(status, tr.getName(), tr.getMethod().getDescription(), stackTrace, tr.getParameters(), tr.getMethod().getConstructorOrMethod().getParameterTypes()); }
tr.getMethod().getDescription(), stackTrace, tr.getParameters(), logResult("SKIPPED CONFIGURATION", Utils.detailedMethodName(tr.getMethod(), false), tr.getMethod().getDescription(), null, tr.getParameters(),
@Override public List<IMethodInstance> intercept(List<IMethodInstance> methods, ITestContext context) { List<IMethodInstance> result = new ArrayList<>(); for (IMethodInstance methodInstance : methods) { ITestNGMethod method = methodInstance.getMethod(); String name = method.getMethodName(); if (!name.equals(methodName)) { result.add(methodInstance); String currentDescription = method.getDescription(); if (currentDescription == null) { method.setDescription(methodName); } else { method.setDescription(currentDescription + methodName); } } } return result; } }
private void logResult(String status, ITestResult tr, String stackTrace) { logResult( status, tr.getName(), tr.getMethod().getDescription(), stackTrace, tr.getParameters(), tr.getMethod().getConstructorOrMethod().getParameterTypes()); }
attributes.setProperty(XMLReporterConfig.ATTR_TEST_INSTANCE_NAME, testInstanceName); String description = testResult.getMethod().getDescription(); if (!Utils.isStringEmpty(description)) { attributes.setProperty(XMLReporterConfig.ATTR_DESC, description);
String description = tr.getMethod().getDescription(); if (! Strings.isNullOrEmpty(description)) { xsb.push("em");
@Test public void testMultipleInterceptorsWithPreserveOrder() { TestNG tng = create(); tng.setTestSuites(Collections.singletonList( getPathToResource("/methodinterceptors/multipleinterceptors/multiple-interceptors.xml"))); TestListenerAdapter tla = new TestListenerAdapter(); tng.addListener((ITestNGListener) tla); tng.run(); Assert.assertEquals(tla.getPassedTests().get(0).getMethod().getDescription(), "abc"); } }
"FAILED CONFIGURATION", Utils.detailedMethodName(tr.getMethod(), false), tr.getMethod().getDescription(), stackTrace, tr.getParameters(), "SKIPPED CONFIGURATION", Utils.detailedMethodName(tr.getMethod(), false), tr.getMethod().getDescription(), null, tr.getParameters(),
attributes.setProperty(XMLReporterConfig.ATTR_TEST_INSTANCE_NAME, testInstanceName); String description = testResult.getMethod().getDescription(); if (!Utils.isStringEmpty(description)) { attributes.setProperty(XMLReporterConfig.ATTR_DESC, description);
String description = tr.getMethod().getDescription(); if (!Strings.isNullOrEmpty(description)) { xsb.push("em");