Class SHAFT.Report

java.lang.Object
com.shaft.driver.SHAFT.Report
Enclosing class:
SHAFT

public static class SHAFT.Report extends Object
Utility class for emitting log messages and attaching artifacts to the Allure execution report.

Usage example:

SHAFT.Report.report("Step completed successfully");
SHAFT.Report.attach("text/plain", "response.json", responseBody);
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    attach(String attachmentType, String attachmentName, InputStream attachmentContent)
    Attaches a binary artifact (e.g., an image) to the Allure report.
    static void
    attach(String attachmentType, String attachmentName, String attachmentContent)
    Attaches a string artifact to the Allure report.
    static void
    log(String message)
    Logs a message discretely (visible in the execution log file but not as a report step).
    static void
    report(String message)
    Logs a message as a visible step in the Allure execution report.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • log

      public static void log(String message)
      Logs a message discretely (visible in the execution log file but not as a report step).
      Parameters:
      message - the message to log
    • report

      public static void report(String message)
      Logs a message as a visible step in the Allure execution report.
      Parameters:
      message - the message to report
    • attach

      public static void attach(String attachmentType, String attachmentName, String attachmentContent)
      Attaches a string artifact to the Allure report.
      Parameters:
      attachmentType - the MIME type of the attachment (e.g., "text/plain")
      attachmentName - a human-readable name for the attachment
      attachmentContent - the content to attach
    • attach

      public static void attach(String attachmentType, String attachmentName, InputStream attachmentContent)
      Attaches a binary artifact (e.g., an image) to the Allure report.
      Parameters:
      attachmentType - the MIME type of the attachment (e.g., "image/png")
      attachmentName - a human-readable name for the attachment
      attachmentContent - an InputStream providing the binary content