Interface UnitTestReporter


public interface UnitTestReporter
  • Method Details

    • isCurrentTestFailed

      boolean isCurrentTestFailed()
      Indicates whether this instance of the test failed.
      Returns:
      true if this instance failed; otherwise, false.
    • openReportLevel

      void openReportLevel(String key, com.hp.lft.report.internal.ReportEventType nodeType, 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(String key, com.hp.lft.report.internal.ReportEventType nodeType, String title, 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(String key, com.hp.lft.report.internal.ReportEventType nodeType, String title, String description, Map<String,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, 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(Throwable throwable)
      Reports a Throwable occurred during execution.
      Parameters:
      throwable - the Throwable that occurred during execution.
    • getCurrentExecutionContextStatus

      Status getCurrentExecutionContextStatus()
      Returns the status of the current execution context. The execution context is equivalent to any superior structure that contains operations (e.g.: test method, reporting context, etc.).
      Returns:
      The status of the current execution context as a Status.