|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.testng.Reporter
public class Reporter
This class is used for test methods to log messages that will be
included in the HTML reports generated by TestNG.
Implementation details.
The reporter keeps a combined output of strings (in m_output) and also
a record of which method output which line. In order to do this, callers
specify what the current method is with setCurrentTestResult() and the
Reporter maintaing a mapping of each test result with a list of integers.
These integers are indices in the combined output (avoids duplicating
the output).
Created on Nov 2, 2005
Constructor Summary | |
---|---|
Reporter()
|
Method Summary | |
---|---|
static void |
clear()
Erase the content of all the output generated so far. |
static ITestResult |
getCurrentTestResult()
|
static List<String> |
getOutput()
|
static List<String> |
getOutput(ITestResult tr)
|
static void |
log(String s)
Log the passed string to the HTML reports |
static void |
log(String s,
boolean logToStandardOut)
Log the passed string to the HTML reports. |
static void |
log(String s,
int level)
Log the passed string to the HTML reports if the current verbosity is equal or greater than the one passed in parameter |
static void |
log(String s,
int level,
boolean logToStandardOut)
Log the passed string to the HTML reports if the current verbosity is equal or greater than the one passed in parameter. |
static void |
setCurrentTestResult(ITestResult m)
|
static void |
setEscapeHtml(boolean escapeHtml)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Reporter()
Method Detail |
---|
public static void setCurrentTestResult(ITestResult m)
public static List<String> getOutput()
public static void clear()
public static void setEscapeHtml(boolean escapeHtml)
escapeHtml
- If true, use HTML entities for special HTML characters (<, >, &, ...).public static void log(String s)
s
- The message to logpublic static void log(String s, int level, boolean logToStandardOut)
s
- The message to loglevel
- The verbosity of this messagelogToStandardOut
- Whether to print this string on standard
out toopublic static void log(String s, boolean logToStandardOut)
s
- The message to loglogToStandardOut
- Whether to print this string on standard
out toopublic static void log(String s, int level)
s
- The message to loglevel
- The verbosity of this messagepublic static ITestResult getCurrentTestResult()
public static List<String> getOutput(ITestResult tr)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |