congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.testng.reporters
Code IndexAdd Tabnine to your IDE (free)

How to use org.testng.reporters

Best Java code snippets using org.testng.reporters (Showing top 20 results out of 315)

origin: org.testng/testng

public static void xmlOpen(IBuffer result, String indent, String tag,
  Properties attributes, boolean noNewLine) {
 result.append(indent).append("<").append(tag);
 appendAttributes(result, attributes);
 result.append(">");
 if (!noNewLine) {
  result.append(EOL);
 }
}
origin: org.testng/testng

/**
 * @param start A string of spaces indicating the indentation at which
 * to start the generation. This constructor will not insert an <?xml
 * prologue.
 */
public XMLStringBuffer(String start) {
 init(Buffer.create(), start);
}
origin: org.testng/testng

/** Put a XML start or empty tag to the XMLStringBuffer depending on hasChildElements parameter */
private boolean putElement(XMLStringBuffer xsb, String tagName, Properties attributes, boolean hasChildElements) {
 if (hasChildElements) {
  xsb.push(tagName, attributes);
 }
 else {
  xsb.addEmptyElement(tagName, attributes);
 }
 return hasChildElements;
}
origin: org.testng/testng

private synchronized void createElementFromIgnoredTests(XMLStringBuffer doc, ITestContext context) {
 Collection<ITestNGMethod> methods = context.getExcludedMethods();
 for (ITestNGMethod method : methods) {
  Properties properties = getPropertiesFor(method, 0);
  doc.push(XMLConstants.TESTCASE,properties);
  doc.addEmptyElement(XMLConstants.ATTR_IGNORED);
  doc.pop();
 }
}
origin: org.testng/testng

/**
 * Push a new tag.  Its value is stored and will be compared against the parameter
 * passed to pop().
 *
 * @param tagName The name of the tag.
 */
public void push(String tagName) {
 push(tagName, "");
}
origin: org.testng/testng

/**
 * Pop the last pushed element without verifying it if matches the previously
 * pushed tag.
 */
public void pop() {
 pop(null);
}
origin: org.testng/testng

/**
 * Invoked after all the tests have run and all their
 * Configuration methods have been called.
 *
 */
@Override
public void onFinish(ITestContext context) {
 generateReport(context);
 resetAll();
}
origin: org.testng/testng

/**
 * Add an empty element tag (e.g. <foo/>)
 *
 * @param tagName The name of the tag
 *
 */
public void addEmptyElement(String tagName) {
 addEmptyElement(tagName, (Properties) null);
}
origin: org.testng/testng

public void addOptional(String tagName, @Nullable String value, String... attributes) {
 if (value != null) {
  XMLUtils.xmlOptional(m_buffer, m_currentIndent, tagName, value, createProperties(attributes));
 }
}
origin: org.testng/testng

/**
 * Writes a TH element with the specified contents and CSS class names.
 * 
 * @param html
 *            the HTML contents
 * @param cssClasses
 *            the space-delimited CSS classes or null if there are no
 *            classes to apply
 */
protected void writeTableHeader(String html, String cssClasses) {
  writeTag("th", html, cssClasses);
}
origin: org.testng/testng

/**
 * Writes a TD element with the specified contents.
 * 
 * @param html
 *            the HTML contents
 */
protected void writeTableData(String html) {
  writeTableData(html, null);
}
origin: org.testng/testng

@Override
public void onFinish(ITestContext context) {
  logResults();
  suiteName = null;
}
origin: org.testng/testng

@Override
public void onFinish(ITestContext context) {
 if (m_verbose >= 2) {
  logResults();
 }
}
origin: org.testng/testng

private synchronized void createElementFromTestResults(XMLStringBuffer document, Collection<ITestResult> results) {
 for(ITestResult tr : results) {
  createElement(document, tr);
 }
}
origin: org.testng/testng

/**
 * @param buffer The StringBuffer to use internally to represent the
 * document.
 * @param start A string of spaces indicating the indentation at which
 * to start the generation.
 */
public XMLStringBuffer(IBuffer buffer, String start) {
 init(buffer, start);
}
origin: org.testng/testng

@Override
public void onTestSuccess(ITestResult tr) {
 log(".");
}
origin: org.testng/testng

@Override
public void onTestStart(ITestResult tr) {
  logTestResult(Status.STARTED, tr, false);
}
origin: org.testng/testng

public XMLStringBuffer() {
 init(Buffer.create(), "", "1.0", "UTF-8");
}
origin: org.testng/testng

/**
 * Add an empty element tag (e.g. <foo/>)
 * @param tagName The name of the tag
 * @param attributes A Properties file containing the attributes (or null)
 */
public void addEmptyElement(String tagName, @Nullable Properties attributes) {
 m_buffer.append(m_currentIndent).append("<").append(tagName);
 XMLUtils.appendAttributes(m_buffer, attributes);
 m_buffer.append("/>").append(EOL);
}
origin: org.testng/testng

/**
 * Writes a TD element with the specified contents and CSS class names.
 * 
 * @param html
 *            the HTML contents
 * @param cssClasses
 *            the space-delimited CSS classes or null if there are no
 *            classes to apply
 */
protected void writeTableData(String html, String cssClasses) {
  writeTag("td", html, cssClasses);
}
org.testng.reporters

Most used classes

  • XMLStringBuffer
    This class allows you to generate an XML text document by pushing and popping tags from a stack main
  • TestHTMLReporter
    This class implements an HTML reporter for individual tests.
  • Buffer
  • EmailableReporter2
    Reporter that generates a single-page HTML report of the test results.
  • EmailableReporter
    Reported designed to render self-contained HTML top down view of a testing suite.
  • FileStringBuffer,
  • Files,
  • JUnitReportReporter,
  • JUnitXMLReporter,
  • VerboseReporter,
  • XMLReporter,
  • XMLReporterConfig,
  • Model,
  • TimesPanel,
  • DotTestListener,
  • EmailableReporter$TestSorter,
  • EmailableReporter2$ClassResult,
  • EmailableReporter2$MethodResult,
  • EmailableReporter2$SuiteResult
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now