Class ClosableTestReport
- java.lang.Object
-
- io.testproject.sdk.internal.reporting.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 voidclose()Submits the report to the Agent.voidsetMessage(java.lang.String message)Set report message.voidsetResult(boolean passed)Set report result (passed / failed).voidsubmit()Submits the report to the Agent.
-
-
-
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 callingclose().
-
close
public void close()
Submits the report to the Agent.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-