Class ReportManager

java.lang.Object
com.shaft.tools.io.ReportManager

public class ReportManager extends Object
Public facade for SHAFT's reporting and logging subsystem.

Provides static methods to emit log entries and report steps during test execution. Messages logged via log(String) appear as visible steps in the Allure execution report, while messages logged via logDiscrete(String) are recorded only in the execution log file.

This is a utility class and cannot be instantiated.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    log(String logText)
    Creates a custom log entry that will also be added as a step in the execution report
    static void
    log(String logText, io.qameta.allure.model.Status stepStatus)
    Creates a custom log entry that will also be added as a step in the execution report, rendered with the exact provided status instead of inferring it from the log text.
    static void
    log(String logText, org.apache.logging.log4j.Level logLevel)
    Creates a custom log entry at the specified log level that will also be added as a step in the execution report
    static void
    Creates a custom log entry that will not be added as a step in the execution report, but you can see it in the attached execution log txt file
    static void
    logDiscrete(String logText, org.apache.logging.log4j.Level logLevel)
    Creates a custom log entry at the specified log level that will not appear as a step in the execution report, but is recorded in the attached execution log text file.

    Methods inherited from class Object

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

    • log

      public static void log(String logText)
      Creates a custom log entry that will also be added as a step in the execution report
      Parameters:
      logText - the text that will be logged by action
    • log

      public static void log(String logText, org.apache.logging.log4j.Level logLevel)
      Creates a custom log entry at the specified log level that will also be added as a step in the execution report
      Parameters:
      logText - the text that will be logged by action
      logLevel - the log level to use (e.g., Level.ERROR, Level.WARN, Level.INFO)
    • log

      public static void log(String logText, io.qameta.allure.model.Status stepStatus)
      Creates a custom log entry that will also be added as a step in the execution report, rendered with the exact provided status instead of inferring it from the log text.

      Failed and broken steps are always visible in the execution report, even while discrete logging is enabled, and are logged to the console at ERROR level.

      Parameters:
      logText - the text that will be logged by action
      stepStatus - the exact status to render for this step (e.g., Status.PASSED, Status.FAILED)
    • logDiscrete

      public static void logDiscrete(String logText)
      Creates a custom log entry that will not be added as a step in the execution report, but you can see it in the attached execution log txt file
      Parameters:
      logText - the text that will be logged by action
    • logDiscrete

      public static void logDiscrete(String logText, org.apache.logging.log4j.Level logLevel)
      Creates a custom log entry at the specified log level that will not appear as a step in the execution report, but is recorded in the attached execution log text file.
      Parameters:
      logText - the text that will be logged
      logLevel - the log level to use (e.g., Level.INFO, Level.DEBUG)