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.IConfigurationListener2, 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 and Description
    `TestFailureListener()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) String` | `getRequestMessageInfo(com.sun.jersey.api.client.ClientRequest req)` Gets diagnostic information about a request message.
    `(package private) String` | `getResponseMessageInfo(com.sun.jersey.api.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, onConfigurationFailure, onConfigurationSkip, onConfigurationSuccess, onFinish, onStart, onTestFailedButWithinSuccessPercentage, 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`

- - ### Constructor Detail

    - #### TestFailureListener

          public TestFailureListener()

  - ### Method Detail

    - #### 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`
      Parameters:
        `result` - A description of a test result (with a fail verdict).

    - #### getRequestMessageInfo

          String getRequestMessageInfo(com.sun.jersey.api.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(com.sun.jersey.api.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.

Copyright © 2021 Open Geospatial Consortium. All rights reserved.