org.jgroups.util

## Class JUnitXMLReporter

- java.lang.Object
- - org.testng.TestListenerAdapter
  - - org.jgroups.util.JUnitXMLReporter

- All Implemented Interfaces:
    org.testng.IInvokedMethodListener, org.testng.internal.IConfigurationListener, org.testng.internal.IResultListener, org.testng.ITestListener, org.testng.ITestNGListener

      public class JUnitXMLReporter
      extends org.testng.TestListenerAdapter
      implements org.testng.IInvokedMethodListener

  Listener generating XML output suitable to be processed by JUnitReport. Copied from TestNG (www.testng.org) and modified
  Author:
    Bela Ban

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.InheritableThreadLocal<java.lang.Class<?>>` | `local`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JUnitXMLReporter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterInvocation(org.testng.IInvokedMethod method, org.testng.ITestResult tr)` Invoked after any method (configuration or test) is invoked
    `void` | `beforeInvocation(org.testng.IInvokedMethod method, org.testng.ITestResult tr)` Invoked before any method (configuration or test) is invoked
    `protected void` | `generateReport(java.lang.Class<?> clazz, java.util.List<org.testng.ITestResult> results)` generate the XML report given what we know from all the test results
    `void` | `onFinish(org.testng.ITestContext context)` Invoked after all the tests have run and all their Configuration methods have been called.
    `void` | `onStart(org.testng.ITestContext context)` Invoked after the test class is instantiated and before any configuration method is called.
    `void` | `onTestFailedButWithinSuccessPercentage(org.testng.ITestResult tr)`
    `void` | `onTestFailure(org.testng.ITestResult tr)` Invoked each time a test fails.
    `void` | `onTestSkipped(org.testng.ITestResult tr)` Invoked each time a test is skipped.
    `void` | `onTestStart(org.testng.ITestResult result)`
    `void` | `onTestSuccess(org.testng.ITestResult tr)` Invoked each time a test succeeds

    - ### Methods inherited from class org.testng.TestListenerAdapter

      `getAllTestMethods, getConfigurationFailures, getConfigurationSkips, getFailedButWithinSuccessPercentageTests, getFailedTests, getPassedTests, getSkippedTests, getTestContexts, onConfigurationFailure, onConfigurationSkip, onConfigurationSuccess, setAllTestMethods, setFailedButWithinSuccessPercentageTests, setFailedTests, setPassedTests, setSkippedTests`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### local

          public static java.lang.InheritableThreadLocal<java.lang.Class<?>> local

  - ### Constructor Detail

    - #### JUnitXMLReporter

          public JUnitXMLReporter()

  - ### Method Detail

    - #### beforeInvocation

          public void beforeInvocation(org.testng.IInvokedMethod method,
                              org.testng.ITestResult tr)

      Invoked before any method (configuration or test) is invoked
      Specified by:
        `beforeInvocation` in interface `org.testng.IInvokedMethodListener`

    - #### afterInvocation

          public void afterInvocation(org.testng.IInvokedMethod method,
                             org.testng.ITestResult tr)

      Invoked after any method (configuration or test) is invoked
      Specified by:
        `afterInvocation` in interface `org.testng.IInvokedMethodListener`

    - #### onTestStart

          public void onTestStart(org.testng.ITestResult result)

      Specified by:
        `onTestStart` in interface `org.testng.ITestListener`
      Overrides:
        `onTestStart` in class `org.testng.TestListenerAdapter`

    - #### onTestSuccess

          public void onTestSuccess(org.testng.ITestResult tr)

      Invoked each time a test succeeds
      Specified by:
        `onTestSuccess` in interface `org.testng.ITestListener`
      Overrides:
        `onTestSuccess` in class `org.testng.TestListenerAdapter`

    - #### onTestFailedButWithinSuccessPercentage

          public void onTestFailedButWithinSuccessPercentage(org.testng.ITestResult tr)

      Specified by:
        `onTestFailedButWithinSuccessPercentage` in interface `org.testng.ITestListener`
      Overrides:
        `onTestFailedButWithinSuccessPercentage` in class `org.testng.TestListenerAdapter`

    - #### onTestFailure

          public void onTestFailure(org.testng.ITestResult tr)

      Invoked each time a test fails.
      Specified by:
        `onTestFailure` in interface `org.testng.ITestListener`
      Overrides:
        `onTestFailure` in class `org.testng.TestListenerAdapter`

    - #### onTestSkipped

          public void onTestSkipped(org.testng.ITestResult tr)

      Invoked each time a test is skipped.
      Specified by:
        `onTestSkipped` in interface `org.testng.ITestListener`
      Overrides:
        `onTestSkipped` in class `org.testng.TestListenerAdapter`

    - #### onStart

          public void onStart(org.testng.ITestContext context)

      Invoked after the test class is instantiated and before any configuration method is called.
      Specified by:
        `onStart` in interface `org.testng.ITestListener`
      Overrides:
        `onStart` in class `org.testng.TestListenerAdapter`

    - #### onFinish

          public void onFinish(org.testng.ITestContext context)

      Invoked after all the tests have run and all their Configuration methods have been called.
      Specified by:
        `onFinish` in interface `org.testng.ITestListener`
      Overrides:
        `onFinish` in class `org.testng.TestListenerAdapter`

    - #### generateReport

          protected void generateReport(java.lang.Class<?> clazz,
                            java.util.List<org.testng.ITestResult> results)
                                 throws java.io.IOException

      generate the XML report given what we know from all the test results
      Throws:
        `java.io.IOException`

Copyright © 1998-2009 Bela Ban / Red Hat. All Rights Reserved.