Interface ReportProvider


public interface ReportProvider
Accesses the OpenText Functional Testing for Developers Report Module.
  • Method Details

    • getReportConfiguration

      ReportConfiguration getReportConfiguration()
      Returns the ReportConfiguration interface, which enables you to customize the report behavior.
      Returns:
      Report Configuration.
    • reportEvent

      void reportEvent(String stepName, String description, Status status) throws ReportException
      Adds a custom step to the 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(String stepName, String description, Status status, String imagePath) throws ReportException
      Adds a custom step to the 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(String stepName, String description, Status status, Throwable e) throws ReportException
      Adds a custom step to the run results report 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(String stepName, String description, Status status, Throwable e, String imagePath) throws ReportException
      Adds a custom step to the run results report 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(String stepName, String description) throws ReportException
      Adds a custom step to the run results report 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(String stepName, String description, Status status, RenderedImage image) throws ReportException
      Adds a custom step to the 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(String stepName, String description, Status status, Throwable e, RenderedImage image) throws ReportException
      Adds a custom step to the run results report 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
    • reportEventWithInfo

      void reportEventWithInfo(String stepName, ReportAdditionalInfo reportAdditionalInfo) throws ReportException
      Adds a custom step to the run results report including the information about the step as a ReportAdditionalInfo object.
      Parameters:
      stepName -
      reportAdditionalInfo -
      Throws:
      ReportException
    • addRunInformation

      void addRunInformation(String fieldName, String fieldValue)
      Adds a custom entry to the top section of the report.
      Parameters:
      fieldName - the entry name.
      fieldValue - the entry value
    • startReportingContext

      void startReportingContext(String contextName) throws ReportException
      Starts a named section in the report.
      Parameters:
      contextName - the section name.
      Throws:
      ReportException - if error occurs in the report
    • startReportingContext

      void startReportingContext(String contextName, String contextDescription) throws ReportException
      Starts a named section in the report.
      Parameters:
      contextName - the section name.
      contextDescription - the section description.
      Throws:
      ReportException - if error occurs in the report
    • startReportingContext

      void startReportingContext(String contextName, String contextDescription, Map<String,Object> additionalInfo) throws ReportException
      Starts a named section in the report.
      Parameters:
      contextName - the section name.
      contextDescription - the section description.
      additionalInfo - the map containing additional custom information
      Throws:
      ReportException - if error occurs in the report
    • startReportingContext

      void startReportingContext(String contextName, ReportContextInfo reportContextInfo) throws ReportException
      Starts a named section in the report.
      Parameters:
      contextName - the section name.
      reportContextInfo - ReportContextInfo object which contain the information to describe the section.
      Throws:
      ReportException - if error occurs in the report
    • endReportingContext

      void endReportingContext() throws ReportException
      Ends the section in the report.
      Throws:
      ReportException - if error occurs in the report
    • startTest

      void startTest(String testName) throws ReportException
      Starts a new test node in the 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(String testName, String testDescription) throws ReportException
      Starts a new test node in the 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

      String generateReport() throws ReportException
      Generates the report.
      Returns:
      the XML file path on which the report is based.
      Throws:
      ReportException - if error occurs in the report
    • getReportDescription

      String getReportDescription()
      Returns the description of the run results report. The description appears directly below the title in the report. By default, the description is empty.
      Returns:
      report the report description.
    • setReportDescription

      void setReportDescription(String reportDescription)
      Sets the report description. The description appears directly below the title in the report.
      Parameters:
      reportDescription - The description to use for the report.
    • getReportTitle

      String getReportTitle()
      Returns the run results report title. Default = Run Results.
      Returns:
      the report title.
    • setReportTitle

      void setReportTitle(String reportTitle)
      Sets the report title.
      Parameters:
      reportTitle - the report description to use.
    • getReportLevel

      ReportLevel getReportLevel()
      Returns the report level used to generate the report.
      Returns:
      the ReportLevel.
    • setReportLevel

      void setReportLevel(ReportLevel reportLevel)
      Sets the report level used to generate the report.
      Parameters:
      reportLevel - the report level to use. Possible values: ReportLevel
    • getSnapshotCaptureLevel

      CaptureLevel getSnapshotCaptureLevel()
      Returns the snapshot capture level used to generate the report.
      Returns:
      the CaptureLevel.
    • setSnapshotCaptureLevel

      void setSnapshotCaptureLevel(CaptureLevel snapshotCaptureLevel)
      Sets the snapshot capture level used to generate the report.
      Parameters:
      snapshotCaptureLevel - the CaptureLevel to use.
    • getRuntimeStatus

      Status getRuntimeStatus()
      Returns the runtime status of the report.
      Returns:
      the Status.
    • reportVerification

      void reportVerification(Status status, VerificationData verificationData) throws ReportException
      Adds a custom verification step to the 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(String stepName, String description) throws ReportException
      Starts a Cucumber step section in the run results report 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(String description, Status status) throws ReportException
      Updates a Cucumber step section in the run results 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(String stepName, String description) throws ReportException
      Throws:
      ReportException
    • endCucumberFeature

      void endCucumberFeature() throws ReportException
      Throws:
      ReportException
    • reportCucumberScenario

      void reportCucumberScenario(String stepName, String description) throws ReportException
      Throws:
      ReportException
    • updateCucumberScenario

      void updateCucumberScenario(String description) throws ReportException
      Throws:
      ReportException
    • endCucumberScenario

      void endCucumberScenario() throws ReportException
      Throws:
      ReportException
    • reportCucumberBackground

      void reportCucumberBackground(String stepName, String description) throws ReportException
      Throws:
      ReportException
    • endCucumberBackground

      void endCucumberBackground() throws ReportException
      Throws:
      ReportException
    • reportCucumberExample

      void reportCucumberExample(String stepName, String description) throws ReportException
      Throws:
      ReportException
    • endCucumberExample

      void endCucumberExample() throws ReportException
      Throws:
      ReportException
    • reportRuntimeError

      void reportRuntimeError(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.
    • 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 object.
    • startScreenRecording

      void startScreenRecording(boolean useCompression, String outputPath) throws ReportException
      Throws:
      ReportException
    • stopScreenRecording

      void stopScreenRecording() throws ReportException
      Throws:
      ReportException