com.hp.lft.report

Interface ReportProvider



  • public interface ReportProvider
    Accesses the UFT Developer report Module.
    • Method Summary

      Modifier and TypeMethod and Description
      voidaddRunInformation(java.lang.String fieldName, java.lang.String fieldValue)
      Adds a custom entry to the top section of the UFT Developer report.
      voidendCucumberBackground() 
      voidendCucumberExample() 
      voidendCucumberFeature() 
      voidendCucumberScenario() 
      voidendCucumberStep() 
      voidendReportingContext()
      Ends the section in the UFT Developer report.
      voidendTest()
      Ends the current test level and sets the test status as passed.
      voidendTest(Status status)
      Ends the current test level and sets the specified status for the test.
      java.lang.StringgenerateReport()
      Generates the UFT Developer report.
      ReportConfigurationgetReportConfiguration()
      Returns the ReportConfiguration interface, which enables you to customize the UFT Developer report behavior.
      java.lang.StringgetReportDescription()
      Returns the UFT Developer report description.
      ReportLevelgetReportLevel()
      Returns the report level used to generate the UFT Developer report.
      java.lang.StringgetReportTitle()
      Returns the UFT Developer report title.
      StatusgetRuntimeStatus()
      Returns the runtime status of the UFT Developer report.
      CaptureLevelgetSnapshotCaptureLevel()
      Returns the snapshot capture level used to generate the UFT Developer report.
      voidinit()
      Initializes the report with the default configuration, as defined in the report section of the leanft.properties file.
      voidinit(ReportConfiguration configuration)
      Initializes the report with provided the report configuration.
      voidreportCucumberBackground(java.lang.String stepName, java.lang.String description) 
      voidreportCucumberExample(java.lang.String stepName, java.lang.String description) 
      voidreportCucumberFeature(java.lang.String stepName, java.lang.String description) 
      voidreportCucumberScenario(java.lang.String stepName, java.lang.String description) 
      voidreportCucumberStep(java.lang.String stepName, java.lang.String description)
      Starts a Cucumber step section in the UFT Developer with default status "Passed".
      voidreportEvent(java.lang.String stepName, java.lang.String description)
      Adds a custom step to the UFT Developer with default status "Passed".
      voidreportEvent(java.lang.String stepName, java.lang.String description, Status status)
      Adds a custom step to the UFT Developer report.
      voidreportEvent(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.
      voidreportEvent(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.
      voidreportEvent(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.
      voidreportEvent(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.
      voidreportEvent(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.
      voidreportRuntimeError(java.lang.Throwable throwable)
      A Runtime error node will be added to the report with the supplied Throwable as the reason.
      voidreportVerification(Status status, VerificationData verificationData)
      Adds a custom verification step to the UFT Developer report.
      voidsetReportDescription(java.lang.String reportDescription)
      Sets the UFT Developer report description.
      voidsetReportLevel(ReportLevel reportLevel)
      Sets the report level used to generate the UFT Developer report.
      voidsetReportTitle(java.lang.String reportTitle)
      Sets the report title.
      voidsetSnapshotCaptureLevel(CaptureLevel snapshotCaptureLevel)
      Sets the snapshot capture level used to generate the UFT Developer report.
      voidstartReportingContext(java.lang.String contextName)
      Starts a named section in the UFT Developer report.
      voidstartReportingContext(java.lang.String contextName, java.lang.String contextDescription)
      Starts a named section in the UFT Developer report.
      voidstartTest(java.lang.String testName)
      Starts a new test node in the UFT Developer report test flow tree.
      voidstartTest(java.lang.String testName, java.lang.String testDescription)
      Starts a new test node in the UFT Developer report test flow tree.
      voidupdateCucumberScenario(java.lang.String description) 
      voidupdateCucumberStep(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 Statusfor 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()
           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
      • reportCucumberFeature

        void reportCucumberFeature(java.lang.String stepName,
                                   java.lang.String description)
                            throws ReportException
        Throws:
        ReportException
      • reportCucumberScenario

        void reportCucumberScenario(java.lang.String stepName,
                                    java.lang.String description)
                             throws ReportException
        Throws:
        ReportException
      • reportCucumberBackground

        void reportCucumberBackground(java.lang.String stepName,
                                      java.lang.String description)
                               throws ReportException
        Throws:
        ReportException
      • reportCucumberExample

        void reportCucumberExample(java.lang.String stepName,
                                   java.lang.String description)
                            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.