Class ClosableTestReport

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public final class ClosableTestReport
    extends java.lang.Object
    implements java.io.Closeable
    • Constructor Summary

      Constructors 
      Constructor Description
      ClosableTestReport​(AgentClient agentClient, ReportingDriver driver, java.lang.String name, boolean passed, java.lang.String message)
      Initializes a new instance of a Test Report.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Submits the report to the Agent.
      void setMessage​(java.lang.String message)
      Set report message.
      void setResult​(boolean passed)
      Set report result (passed / failed).
      void submit()
      Submits the report to the Agent.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClosableTestReport

        public ClosableTestReport​(AgentClient agentClient,
                                  ReportingDriver driver,
                                  java.lang.String name,
                                  boolean passed,
                                  java.lang.String message)
        Initializes a new instance of a Test Report.
        Parameters:
        agentClient - Agent client instance to use for reporting.
        driver - Driver used for test automation and reporting.
        name - Test name.
        passed - True if passed, otherwise False.
        message - Result message.
    • Method Detail

      • setResult

        public void setResult​(boolean passed)
        Set report result (passed / failed).
        Parameters:
        passed - True if passed, otherwise False.
      • setMessage

        public void setMessage​(java.lang.String message)
        Set report message.
        Parameters:
        message - Massage to be set.
      • submit

        public void submit()
        Submits the report to the Agent. Calling this method is effectively the same as calling close().
      • close

        public void close()
        Submits the report to the Agent.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable