Skip to main content

SeeTestAutomation- setReportStatus

info

Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .

setReportStatus(String status,String message)

Description

Overrides final report status. Used in order to match a local test result with the report result.

Parameters

  • status: Test status to set. Can be 'Failed', 'Skipped' or 'Passed'.

  • message: Error message. Cause of failure. The value appears in reporter under 'cause' field and in the report under 'error message' 

  • Stacktrace: A string representation of exception stacktrace.

Code Examples

Java Example - 1

client.setReportStatus("skipped", "Failed to assert result");

Java Example - 2

try{
throw new RuntimeException("Some message");
}catch(Exception e){
java.io.StringWriter stringWriter = new StringWriter();
java.io.PrintWriter printWriter = new PrintWriter(stringWriter);
e.printStackTrace(printWriter);
client.setReportStatus("failed",e.getMessage(),stringWriter.toString());
}