Package org.opengis.cite.ogcapifeatures10.listener

# Class TestFailureListener

java.lang.Object
org.testng.TestListenerAdapter
org.opengis.cite.ogcapifeatures10.listener.TestFailureListener

All Implemented Interfaces:
  `org.testng.IConfigurationListener`, `org.testng.internal.IResultListener`, `org.testng.internal.IResultListener2`, `org.testng.ITestListener`, `org.testng.ITestNGListener`

public class TestFailureListener extends org.testng.TestListenerAdapter
A listener that augments a test result with diagnostic information in the event that a test method failed. This information will appear in the XML report when the test run is completed.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TestFailureListener()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `(package private) String`
  `getRequestMessageInfo(org.glassfish.jersey.client.ClientRequest req)`
  Gets diagnostic information about a request message.
  `(package private) String`
  `getResponseMessageInfo(org.glassfish.jersey.client.ClientResponse rsp)`
  Gets diagnostic information about a response message.
  `void`
  `onTestFailure(org.testng.ITestResult result)`
  Sets the "request" and "response" attributes of a test result.

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

  `beforeConfiguration, getAllTestMethods, getConfigurationFailures, getConfigurationSkips, getFailedButWithinSuccessPercentageTests, getFailedTests, getPassedTests, getSkippedTests, getTestContexts, getTimedoutTests, onConfigurationFailure, onConfigurationSkip, onConfigurationSuccess, onFinish, onStart, onTestFailedButWithinSuccessPercentage, onTestFailedWithTimeout, onTestSkipped, onTestStart, onTestSuccess, setAllTestMethods, setFailedButWithinSuccessPercentageTests, setFailedTests, setPassedTests, setSkippedTests, toString`

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

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

  ### Methods inherited from interface org.testng.IConfigurationListener

  `beforeConfiguration, onConfigurationFailure, onConfigurationSkip, onConfigurationSuccess`

- ## Constructor Details

  - ### TestFailureListener

    public TestFailureListener()

- ## Method Details

  - ### onTestFailure

    public void onTestFailure(org.testng.ITestResult result)
    Sets the "request" and "response" attributes of a test result. The value of these attributes is a string that contains information about the content of an outgoing or incoming message: target resource, status code, headers, entity (if present). The entity is represented as a String with UTF-8 character encoding.
    Specified by:
      `onTestFailure` in interface `org.testng.ITestListener`
    Overrides:
      `onTestFailure` in class `org.testng.TestListenerAdapter`

  - ### getRequestMessageInfo

    String getRequestMessageInfo(org.glassfish.jersey.client.ClientRequest req)
    Gets diagnostic information about a request message. If the request contains a message body, it should be represented as a DOM Document node or as an object having a meaningful toString() implementation.
    Parameters:
      `req` - An object representing an HTTP request message.
    Returns:
      A string containing information gleaned from the request message.

  - ### getResponseMessageInfo

    String getResponseMessageInfo(org.glassfish.jersey.client.ClientResponse rsp)
    Gets diagnostic information about a response message.
    Parameters:
      `rsp` - An object representing an HTTP response message.
    Returns:
      A string containing information gleaned from the response message.