Share this page

com.hp.lft.report

## Interface ReportProvider

-     public interface ReportProvider

  Accesses the UFT Developer report Module.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRunInformation(java.lang.String fieldName, java.lang.String fieldValue)` Adds a custom entry to the top section of the UFT Developer report.
    `void` | `endCucumberBackground()`
    `void` | `endCucumberExample()`
    `void` | `endCucumberFeature()`
    `void` | `endCucumberScenario()`
    `void` | `endCucumberStep()`
    `void` | `endReportingContext()` Ends the section in the UFT Developer report.
    `void` | `endTest()` Ends the current test level and sets the test status as passed.
    `void` | `endTest(Status status)` Ends the current test level and sets the specified status for the test.
    `java.lang.String` | `generateReport()` Generates the UFT Developer report.
    `ReportConfiguration` | `getReportConfiguration()` Returns the `ReportConfiguration` interface, which enables you to customize the UFT Developer report behavior.
    `java.lang.String` | `getReportDescription()` Returns the UFT Developer report description.
    `ReportLevel` | `getReportLevel()` Returns the report level used to generate the UFT Developer report.
    `java.lang.String` | `getReportTitle()` Returns the UFT Developer report title.
    `Status` | `getRuntimeStatus()` Returns the runtime status of the UFT Developer report.
    `CaptureLevel` | `getSnapshotCaptureLevel()` Returns the snapshot capture level used to generate the UFT Developer report.
    `void` | `init()` Initializes the report with the default configuration, as defined in the report section of the leanft.properties file.
    `void` | `init(ReportConfiguration configuration)` Initializes the report with provided the report configuration.
    `void` | `reportCucumberBackground(java.lang.String stepName, java.lang.String description)`
    `void` | `reportCucumberExample(java.lang.String stepName, java.lang.String description)`
    `void` | `reportCucumberFeature(java.lang.String stepName, java.lang.String description)`
    `void` | `reportCucumberScenario(java.lang.String stepName, java.lang.String description)`
    `void` | `reportCucumberStep(java.lang.String stepName, java.lang.String description)` Starts a Cucumber step section in the UFT Developer with default status "Passed".
    `void` | `reportEvent(java.lang.String stepName, java.lang.String description)` Adds a custom step to the UFT Developer with default status "Passed".
    `void` | `reportEvent(java.lang.String stepName, java.lang.String description, Status status)` Adds a custom step to the UFT Developer report.
    `void` | `reportEvent(java.lang.String stepName, java.lang.String description, Status status, java.awt.image.RenderedImage image)` Adds a custom step to the UFT Developer report including the provided image object.
    `void` | `reportEvent(java.lang.String stepName, java.lang.String description, Status status, java.lang.String imagePath)` Adds a custom step to the UFT Developer report including the image from the specified path.
    `void` | `reportEvent(java.lang.String stepName, java.lang.String description, Status status, java.lang.Throwable e)` Adds a custom step to the UFT Developer including the provided exception.
    `void` | `reportEvent(java.lang.String stepName, java.lang.String description, Status status, java.lang.Throwable e, java.awt.image.RenderedImage image)` Adds a custom step to the UFT Developer including the provided exception and image object.
    `void` | `reportEvent(java.lang.String stepName, java.lang.String description, Status status, java.lang.Throwable e, java.lang.String imagePath)` Adds a custom step to the UFT Developer including exception details and the image from the specified path.
    `void` | `reportRuntimeError(java.lang.Throwable throwable)` A Runtime error node will be added to the report with the supplied `Throwable` as the reason.
    `void` | `reportVerification(Status status, VerificationData verificationData)` Adds a custom verification step to the UFT Developer report.
    `void` | `setReportDescription(java.lang.String reportDescription)` Sets the UFT Developer report description.
    `void` | `setReportLevel(ReportLevel reportLevel)` Sets the report level used to generate the UFT Developer report.
    `void` | `setReportTitle(java.lang.String reportTitle)` Sets the report title.
    `void` | `setSnapshotCaptureLevel(CaptureLevel snapshotCaptureLevel)` Sets the snapshot capture level used to generate the UFT Developer report.
    `void` | `startReportingContext(java.lang.String contextName)` Starts a named section in the UFT Developer report.
    `void` | `startReportingContext(java.lang.String contextName, java.lang.String contextDescription)` Starts a named section in the UFT Developer report.
    `void` | `startTest(java.lang.String testName)` Starts a new test node in the UFT Developer report test flow tree.
    `void` | `startTest(java.lang.String testName, java.lang.String testDescription)` Starts a new test node in the UFT Developer report test flow tree.
    `void` | `updateCucumberScenario(java.lang.String description)`
    `void` | `updateCucumberStep(java.lang.String description, Status status)` Updates a Cucumber step section in the UFT Developer report.

- - ### Method Detail

    - #### getReportConfiguration

          ReportConfiguration getReportConfiguration()

      Returns the `ReportConfiguration` interface, which enables you to customize the UFT Developer report behavior.
      Returns:
        Report Configuration.

    - #### reportEvent

          void reportEvent(java.lang.String stepName,
                           java.lang.String description,
                           Status status)
                    throws ReportException

      Adds a custom step to the UFT Developer report.
      Parameters:
        `stepName` - the name of the reported step. This name is the label of the step node in the report.
        `description` - the description of the reported step. The description is displayed in the Details pane of the report.
        `status` - the `Status` for the step.
      Throws:
        `ReportException` - if error occurs in the report

    - #### reportEvent

          void reportEvent(java.lang.String stepName,
                           java.lang.String description,
                           Status status,
                           java.lang.String imagePath)
                    throws ReportException

      Adds a custom step to the UFT Developer report including the image from the specified path.
      Parameters:
        `stepName` - the name of the reported step. This name is the label of the step node in the report.
        `description` - the description of the reported step. The description is displayed in the Details pane of the report.
        `status` - the `Status`for the step.
        `imagePath` - the full path of the image to display for the step. Supported image types: BMP, GIF, JPEG, PNG, TIFF
      Throws:
        `ReportException` - if error occurs in the report

    - #### reportEvent

          void reportEvent(java.lang.String stepName,
                           java.lang.String description,
                           Status status,
                           java.lang.Throwable e)
                    throws ReportException

      Adds a custom step to the UFT Developer including the provided exception.
      Parameters:
        `stepName` - the name of the reported step. This name is the label of the step node in the report.
        `description` - the description of the reported step. The description is displayed in the Details pane of the report.
        `status` - the `Status` for the step.
        `e` - the error that occurred.
      Throws:
        `ReportException` - if error occurs in the report

    - #### reportEvent

          void reportEvent(java.lang.String stepName,
                           java.lang.String description,
                           Status status,
                           java.lang.Throwable e,
                           java.lang.String imagePath)
                    throws ReportException

      Adds a custom step to the UFT Developer including exception details and the image from the specified path.
      Parameters:
        `stepName` - the name of the reported step. This name is the label of the step node in the report.
        `description` - the description of the reported step. The description is displayed in the Details pane of the report.
        `status` - the `Status` for the step.
        `e` - the error that occurred.
        `imagePath` - the full path of the image to display for the step. Supported image types: BMP, GIF, JPEG, PNG, TIFF
      Throws:
        `ReportException` - if error occurs in the report

    - #### reportEvent

          void reportEvent(java.lang.String stepName,
                           java.lang.String description)
                    throws ReportException

      Adds a custom step to the UFT Developer with default status "Passed".
      Parameters:
        `stepName` - the name of the reported step. This name is the label of the step node in the report.
        `description` - the description of the reported step. The description is displayed in the Details pane of the report.
      Throws:
        `ReportException` - if error occurs in the report

    - #### reportEvent

          void reportEvent(java.lang.String stepName,
                           java.lang.String description,
                           Status status,
                           java.awt.image.RenderedImage image)
                    throws ReportException

      Adds a custom step to the UFT Developer report including the provided image object.
      Parameters:
        `stepName` - the name of the reported step. This name is the label of the step node in the report.
        `description` - the description of the reported step. The description is displayed in the Details pane of the report.
        `status` - the `Status` for the step.
        `image` - the RenderedImage object to use for the step.
      Throws:
        `ReportException` - if error occurs in the report

    - #### reportEvent

          void reportEvent(java.lang.String stepName,
                           java.lang.String description,
                           Status status,
                           java.lang.Throwable e,
                           java.awt.image.RenderedImage image)
                    throws ReportException

      Adds a custom step to the UFT Developer including the provided exception and image object.
      Parameters:
        `stepName` - the name of the reported step. This name is the label of the step node in the report.
        `description` - the description of the reported step. The description is displayed in the Details pane of the report.
        `status` - the `Status` for the step.
        `e` - the error that occurred.
        `image` - the RenderedImage object to use for the step.
      Throws:
        `ReportException` - if error occurs in the report

    - #### addRunInformation

          void addRunInformation(java.lang.String fieldName,
                                 java.lang.String fieldValue)

      Adds a custom entry to the top section of the UFT Developer report.
      Parameters:
        `fieldName` - the entry name.
        `fieldValue` - the entry value

    - #### startReportingContext

          void startReportingContext(java.lang.String contextName)
                              throws ReportException

      Starts a named section in the UFT Developer report.
      Parameters:
        `contextName` - the section name.
      Throws:
        `ReportException` - if error occurs in the report

    - #### startReportingContext

          void startReportingContext(java.lang.String contextName,
                                     java.lang.String contextDescription)
                              throws ReportException

      Starts a named section in the UFT Developer report.
      Parameters:
        `contextName` - the section name.
        `contextDescription` - the section description.
      Throws:
        `ReportException` - if error occurs in the report

    - #### endReportingContext

          void endReportingContext()
                            throws ReportException

      Ends the section in the UFT Developer report.
      Throws:
        `ReportException` - if error occurs in the report

    - #### startTest

          void startTest(java.lang.String testName)
                  throws ReportException

      Starts a new test node in the UFT Developer report test flow tree. Required only when using Reporter in a class that does not inherit from UnitTestBase.
      Parameters:
        `testName` - name of the test.
      Throws:
        `ReportException` - if error occurs in the report

    - #### startTest

          void startTest(java.lang.String testName,
                         java.lang.String testDescription)
                  throws ReportException

      Starts a new test node in the UFT Developer report test flow tree.
      Parameters:
        `testName` - the test name.
        `testDescription` - the test description.
      Throws:
        `ReportException` - if error occurs in the report

    - #### endTest

          void endTest()
                throws ReportException

      Ends the current test level and sets the test status as passed.
      Throws:
        `ReportException` - if error occurs in the report

    - #### endTest

          void endTest(Status status)
                throws ReportException

      Ends the current test level and sets the specified status for the test.
      Parameters:
        `status` - the `Status` for the current test.
      Throws:
        `ReportException` - if error occurs in the report

    - #### init

          void init(ReportConfiguration configuration)
             throws ReportException

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

    - #### init

          void init()
             throws ReportException

      Initializes the report with the default configuration, as defined in the report section of the leanft.properties file.
      Throws:
        `ReportException` - if error occurs in the report

    - #### generateReport

          java.lang.String generateReport()
                                   throws ReportException

      Generates the UFT Developer report.
      Returns:
        the XML file path on which the UFT Developer report is based.
      Throws:
        `ReportException` - if error occurs in the report

    - #### getReportDescription

          java.lang.String getReportDescription()

      Returns the UFT Developer report description. The description appears directly below the title in the UFT Developer report. By default, the description is empty.
      Returns:
        report the UFT Developer report description.

    - #### setReportDescription

          void setReportDescription(java.lang.String reportDescription)

      Sets the UFT Developer report description. The description appears directly below the title in the UFT Developer report.
      Parameters:
        `reportDescription` - The description to use for the report.

    - #### getReportTitle

          java.lang.String getReportTitle()

      Returns the UFT Developer report title. Default = Run Results.
      Returns:
        the UFT Developer report title.

    - #### setReportTitle

          void setReportTitle(java.lang.String reportTitle)

      Sets the report title.
      Parameters:
        `reportTitle` - the report description to use.

    - #### getReportLevel

          ReportLevel getReportLevel()

      Returns the report level used to generate the UFT Developer report.
      Returns:
        the `ReportLevel`.

    - #### setReportLevel

          void setReportLevel(ReportLevel reportLevel)

      Sets the report level used to generate the UFT Developer report.
      Parameters:
        `reportLevel` - the report level to use. Possible values: `ReportLevel`

    - #### getSnapshotCaptureLevel

          CaptureLevel getSnapshotCaptureLevel()

      Returns the snapshot capture level used to generate the UFT Developer report.
      Returns:
        the `CaptureLevel`.

    - #### setSnapshotCaptureLevel

          void setSnapshotCaptureLevel(CaptureLevel snapshotCaptureLevel)

      Sets the snapshot capture level used to generate the UFT Developer report.
      Parameters:
        `snapshotCaptureLevel` - the `CaptureLevel` to use.

    - #### getRuntimeStatus

          Status getRuntimeStatus()

      Returns the runtime status of the UFT Developer report.
      Returns:
        the `Status`.

    - #### reportVerification

          void reportVerification(Status status,
                                  VerificationData verificationData)
                           throws ReportException

      Adds a custom verification step to the UFT Developer report.
      Parameters:
        `status` - Specify the status of the verification.
        `verificationData` - The report verification data.
      Throws:
        `ReportException` - if error occurs in the report

    - #### reportCucumberStep

          void reportCucumberStep(java.lang.String stepName,
                                  java.lang.String description)
                           throws ReportException

      Starts a Cucumber step section in the UFT Developer with default status "Passed".
      Parameters:
        `stepName` - the name of the reported step. This name is the label of the step node in the report.
        `description` - the description of the reported step. The description is displayed in the Details pane of the report.
      Throws:
        `ReportException` - if error occurs in the report

    - #### updateCucumberStep

          void updateCucumberStep(java.lang.String description,
                                  Status status)
                           throws ReportException

      Updates a Cucumber step section in the UFT Developer report.
      Parameters:
        `description` - the description of the reported step. The description is displayed in the Details pane of the report.
        `status` - the `Status` for the step.
      Throws:
        `ReportException` - if error occurs in the report

    - #### endCucumberStep

          void endCucumberStep()
                        throws ReportException

      Throws:
        `ReportException`

    - #### reportCucumberFeature

          void reportCucumberFeature(java.lang.String stepName,
                                     java.lang.String description)
                              throws ReportException

      Throws:
        `ReportException`

    - #### endCucumberFeature

          void endCucumberFeature()
                           throws ReportException

      Throws:
        `ReportException`

    - #### reportCucumberScenario

          void reportCucumberScenario(java.lang.String stepName,
                                      java.lang.String description)
                               throws ReportException

      Throws:
        `ReportException`

    - #### updateCucumberScenario

          void updateCucumberScenario(java.lang.String description)
                               throws ReportException

      Throws:
        `ReportException`

    - #### endCucumberScenario

          void endCucumberScenario()
                            throws ReportException

      Throws:
        `ReportException`

    - #### reportCucumberBackground

          void reportCucumberBackground(java.lang.String stepName,
                                        java.lang.String description)
                                 throws ReportException

      Throws:
        `ReportException`

    - #### endCucumberBackground

          void endCucumberBackground()
                              throws ReportException

      Throws:
        `ReportException`

    - #### reportCucumberExample

          void reportCucumberExample(java.lang.String stepName,
                                     java.lang.String description)
                              throws ReportException

      Throws:
        `ReportException`

    - #### endCucumberExample

          void endCucumberExample()
                           throws ReportException

      Throws:
        `ReportException`

    - #### reportRuntimeError

          void reportRuntimeError(java.lang.Throwable throwable)

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

Tips to improve your search results... UFT Developer Java SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: