Open topic with navigation

com.hp.lft.report

## Interface UnitTestReporter

-     public interface UnitTestReporter

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `void` | `closeAllReportLevels()` Ends all report levels.
    `void` | `closeCurrentReportLevel()` Ends the report level.
    `void` | `closeCurrentReportLevel(com.hp.lft.report.internal.ReportEventType type)` Ends the report level.
    `void` | `closeCurrentReportLevel(com.hp.lft.report.internal.ReportEventType type, Status status)` Ends the report level.
    `void` | `closeCurrentReportLevel(Status status)` Ends the report level.
    `void` | `init(ReportConfiguration configuration)` Initializes the provided `ReportConfiguration`.
    `boolean` | `isCurrentTestFailed()` Indicates whether this instance of the test failed.
    `void` | `openReportLevel(java.lang.String key, com.hp.lft.report.internal.ReportEventType nodeType, java.lang.String title)` Adds a level to the report.
    `void` | `openReportLevel(java.lang.String key, com.hp.lft.report.internal.ReportEventType nodeType, java.lang.String title, java.lang.String description)` Adds a level to the report.
    `void` | `openReportLevel(java.lang.String key, com.hp.lft.report.internal.ReportEventType nodeType, java.lang.String title, java.lang.String description, java.util.HashMap<java.lang.String,java.lang.Object> data)` Adds a level to the report.
    `void` | `reportRuntimeError(java.lang.Throwable throwable)` Reports a Throwable occurred during execution.
    `void` | `updateReportStatus(Status nodeStatus)` Updates the report status.
    `void` | `updateReportStatus(Status status, java.lang.Throwable throwable)` Updates the report status to failed and supplies a `Throwable` as the reason.

- - ### Method Detail

    - #### isCurrentTestFailed

          boolean isCurrentTestFailed()

      Indicates whether this instance of the test failed.
      Returns:
        true if this instance failed; otherwise, false.

    - #### openReportLevel

          void openReportLevel(java.lang.String key,
                               com.hp.lft.report.internal.ReportEventType nodeType,
                               java.lang.String title)
                        throws ReportException

      Adds a level to the report.
      Parameters:
        `key` - the node key.
        `nodeType` - the type of node.
        `title` - the label of the node.
      Throws:
        `ReportException` - if error occurs in the report

    - #### openReportLevel

          void openReportLevel(java.lang.String key,
                               com.hp.lft.report.internal.ReportEventType nodeType,
                               java.lang.String title,
                               java.lang.String description)
                        throws ReportException

      Adds a level to the report.
      Parameters:
        `key` - the node key.
        `nodeType` - the type of node.
        `title` - the label of the node.
        `description` - the description displayed in the Details pane for this node.
      Throws:
        `ReportException` - if error occurs in the report

    - #### openReportLevel

          void openReportLevel(java.lang.String key,
                               com.hp.lft.report.internal.ReportEventType nodeType,
                               java.lang.String title,
                               java.lang.String description,
                               java.util.HashMap<java.lang.String,java.lang.Object> data)
                        throws ReportException

      Adds a level to the report.
      Parameters:
        `key` - the node key.
        `nodeType` - the type of node.
        `title` - the label of the node.
        `description` - the description displayed in the Details pane for this node.
        `data` - additional data for the report.
      Throws:
        `ReportException` - if error occurs in the report

    - #### closeCurrentReportLevel

          void closeCurrentReportLevel()
                                throws ReportException

      Ends the report level.
      Throws:
        `ReportException` - if error occurs in the report

    - #### closeCurrentReportLevel

          void closeCurrentReportLevel(com.hp.lft.report.internal.ReportEventType type)
                                throws ReportException

      Ends the report level.
      Parameters:
        `type` - the type of node.
      Throws:
        `ReportException` - if error occurs in the report

    - #### closeCurrentReportLevel

          void closeCurrentReportLevel(Status status)
                                throws ReportException

      Ends the report level.
      Parameters:
        `status` - the status of node.
      Throws:
        `ReportException` - if error occurs in the report

    - #### closeCurrentReportLevel

          void closeCurrentReportLevel(com.hp.lft.report.internal.ReportEventType type,
                                       Status status)
                                throws ReportException

      Ends the report level.
      Parameters:
        `type` - the type of node.
        `status` - status of the node.
      Throws:
        `ReportException` - if error occurs in the report

    - #### closeAllReportLevels

          void closeAllReportLevels()

      Ends all report levels.

    - #### updateReportStatus

          void updateReportStatus(Status nodeStatus)

      Updates the report status.
      Parameters:
        `nodeStatus` - the node status.

    - #### updateReportStatus

          void updateReportStatus(Status status,
                                  java.lang.Throwable throwable)

      Updates the report status to failed and supplies a `Throwable` as the reason. A Runtime error node will be added to the report with the supplied `Throwable`.
      Parameters:
        `status` - the node
        `throwable` - the reason for the report failure.

    - #### init

          void init(ReportConfiguration configuration)
             throws ReportException

      Initializes the provided `ReportConfiguration`.
      Parameters:
        `configuration` - `ReportConfiguration`.
      Throws:
        `ReportException` - if error occurs in the report

    - #### reportRuntimeError

          void reportRuntimeError(java.lang.Throwable throwable)

      Reports a Throwable occurred during execution.
      Parameters:
        `throwable` - the Throwable that occurred during execution.