|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgroups.util.JUnitXMLReporter
public class JUnitXMLReporter
Listener generating XML output suitable to be processed by JUnitReport. Copied from TestNG (www.testng.org) and modified
| Nested Class Summary | |
|---|---|
protected static class |
JUnitXMLReporter.MyOutput
|
static class |
JUnitXMLReporter.TestCase
|
| Field Summary | |
|---|---|
protected static java.lang.String |
CDATA
|
protected static java.lang.String |
GT
|
protected static java.lang.String |
LT
|
protected java.io.PrintStream |
old_stderr
|
protected java.io.PrintStream |
old_stdout
|
protected java.lang.String |
output_dir
|
static java.lang.InheritableThreadLocal<java.io.PrintStream> |
stderr
|
protected static java.lang.String |
STDERR
|
static java.lang.InheritableThreadLocal<java.io.PrintStream> |
stdout
|
protected static java.lang.String |
STDOUT
|
protected static java.lang.String |
SYSTEM_ERR
|
protected static java.lang.String |
SYSTEM_OUT
|
protected java.util.concurrent.ConcurrentMap<java.lang.Class<?>,java.io.DataOutputStream> |
tests
|
protected static java.lang.String |
TESTS
|
protected static java.lang.String |
XML_DEF
|
| Constructor Summary | |
|---|---|
JUnitXMLReporter()
|
|
| Method Summary | |
|---|---|
protected void |
addTest(java.lang.Class<?> clazz,
org.testng.ITestResult result)
|
void |
beforeConfiguration(org.testng.ITestResult tr)
|
protected static void |
closeStreams()
|
protected static int |
copy(java.io.Reader in,
java.io.Writer out)
Copies the contents of in into out |
protected static void |
deleteContents(java.io.File dir)
Deletes all files and dirs in dir, but not dir itself |
protected void |
error(java.lang.String msg)
|
protected static java.lang.String |
escape(java.lang.String message)
|
protected static void |
generateReport(java.io.Writer out,
java.lang.String classname,
java.util.List<JUnitXMLReporter.TestCase> results,
java.io.Reader stdout,
java.io.Reader stderr)
Generate the XML report from all the test results |
protected void |
generateReports()
Generate the XML report from all the test results |
static int |
getErrors(java.util.Collection<JUnitXMLReporter.TestCase> results)
|
static int |
getFailures(java.util.Collection<JUnitXMLReporter.TestCase> results)
|
protected static java.lang.String |
getMethodName(org.testng.ITestResult tr)
|
static int |
getSkips(java.util.Collection<JUnitXMLReporter.TestCase> results)
|
protected static java.lang.String |
getStatus(JUnitXMLReporter.TestCase tr)
|
static long |
getTotalTime(java.util.Collection<JUnitXMLReporter.TestCase> results)
|
static void |
main(java.lang.String[] args)
|
void |
onConfigurationFailure(org.testng.ITestResult tr)
|
void |
onConfigurationSkip(org.testng.ITestResult tr)
|
void |
onConfigurationSuccess(org.testng.ITestResult tr)
|
void |
onFinish(org.testng.ITestContext context)
Invoked after all test classes in this test have been run |
void |
onStart(org.testng.ITestContext context)
Invoked at the start of the test, before any of the classes in the test are run |
protected void |
onTestCompleted(org.testng.ITestResult tr,
java.lang.String message,
java.io.PrintStream out)
|
void |
onTestFailedButWithinSuccessPercentage(org.testng.ITestResult tr)
|
void |
onTestFailure(org.testng.ITestResult tr)
Invoked each time a test method fails |
void |
onTestSkipped(org.testng.ITestResult tr)
Invoked each time a test method is skipped |
void |
onTestStart(org.testng.ITestResult result)
|
void |
onTestSuccess(org.testng.ITestResult tr)
Invoked each time a test method succeeds |
protected static void |
print(java.io.PrintStream out,
java.lang.String msg,
java.lang.String classname,
java.lang.String method_name)
|
protected static java.lang.String |
printException(java.lang.Throwable ex)
|
protected void |
println(java.lang.String msg)
|
protected static void |
process(java.io.File dir)
|
protected void |
setupStreams(org.testng.ITestResult result,
boolean printMethodName)
|
protected static java.lang.String |
writeFailure(java.lang.String type,
java.lang.String failure_type,
java.lang.String failure_msg,
java.lang.String stack_trace)
|
protected static void |
writeOutput(int type,
java.io.Reader in,
java.io.Writer out)
|
protected static void |
writeTestCase(java.io.Writer out,
JUnitXMLReporter.TestCase result)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String output_dir
protected static final java.lang.String XML_DEF
protected static final java.lang.String CDATA
protected static final java.lang.String LT
protected static final java.lang.String GT
protected static final java.lang.String SYSTEM_OUT
protected static final java.lang.String SYSTEM_ERR
protected static final java.lang.String TESTS
protected static final java.lang.String STDOUT
protected static final java.lang.String STDERR
protected java.io.PrintStream old_stdout
protected java.io.PrintStream old_stderr
protected final java.util.concurrent.ConcurrentMap<java.lang.Class<?>,java.io.DataOutputStream> tests
public static final java.lang.InheritableThreadLocal<java.io.PrintStream> stdout
public static final java.lang.InheritableThreadLocal<java.io.PrintStream> stderr
| Constructor Detail |
|---|
public JUnitXMLReporter()
| Method Detail |
|---|
public void onStart(org.testng.ITestContext context)
onStart in interface org.testng.ITestListenerpublic void onFinish(org.testng.ITestContext context)
onFinish in interface org.testng.ITestListenerpublic void onTestStart(org.testng.ITestResult result)
onTestStart in interface org.testng.ITestListenerpublic void onTestSuccess(org.testng.ITestResult tr)
onTestSuccess in interface org.testng.ITestListenerpublic void onTestFailedButWithinSuccessPercentage(org.testng.ITestResult tr)
onTestFailedButWithinSuccessPercentage in interface org.testng.ITestListenerpublic void onTestFailure(org.testng.ITestResult tr)
onTestFailure in interface org.testng.ITestListenerpublic void onTestSkipped(org.testng.ITestResult tr)
onTestSkipped in interface org.testng.ITestListenerpublic void beforeConfiguration(org.testng.ITestResult tr)
beforeConfiguration in interface org.testng.IConfigurationListener2public void onConfigurationSuccess(org.testng.ITestResult tr)
onConfigurationSuccess in interface org.testng.IConfigurationListenerpublic void onConfigurationFailure(org.testng.ITestResult tr)
onConfigurationFailure in interface org.testng.IConfigurationListenerpublic void onConfigurationSkip(org.testng.ITestResult tr)
onConfigurationSkip in interface org.testng.IConfigurationListener
protected void onTestCompleted(org.testng.ITestResult tr,
java.lang.String message,
java.io.PrintStream out)
protected void setupStreams(org.testng.ITestResult result,
boolean printMethodName)
protected static void closeStreams()
protected static void print(java.io.PrintStream out,
java.lang.String msg,
java.lang.String classname,
java.lang.String method_name)
protected void error(java.lang.String msg)
protected void println(java.lang.String msg)
protected void addTest(java.lang.Class<?> clazz,
org.testng.ITestResult result)
protected static java.lang.String getMethodName(org.testng.ITestResult tr)
protected void generateReports()
throws java.io.IOException
java.io.IOException
protected static void process(java.io.File dir)
throws java.io.IOException
java.io.IOException
protected static void generateReport(java.io.Writer out,
java.lang.String classname,
java.util.List<JUnitXMLReporter.TestCase> results,
java.io.Reader stdout,
java.io.Reader stderr)
throws java.io.IOException
java.io.IOException
protected static void writeTestCase(java.io.Writer out,
JUnitXMLReporter.TestCase result)
throws java.io.IOException
java.io.IOException
protected static void writeOutput(int type,
java.io.Reader in,
java.io.Writer out)
throws java.io.IOException
java.io.IOExceptionprotected static java.lang.String getStatus(JUnitXMLReporter.TestCase tr)
protected static java.lang.String writeFailure(java.lang.String type,
java.lang.String failure_type,
java.lang.String failure_msg,
java.lang.String stack_trace)
throws java.io.IOException
java.io.IOException
protected static java.lang.String printException(java.lang.Throwable ex)
throws java.io.IOException
java.io.IOExceptionprotected static java.lang.String escape(java.lang.String message)
public static long getTotalTime(java.util.Collection<JUnitXMLReporter.TestCase> results)
public static int getFailures(java.util.Collection<JUnitXMLReporter.TestCase> results)
public static int getErrors(java.util.Collection<JUnitXMLReporter.TestCase> results)
public static int getSkips(java.util.Collection<JUnitXMLReporter.TestCase> results)
protected static void deleteContents(java.io.File dir)
protected static int copy(java.io.Reader in,
java.io.Writer out)
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||