a class that manages reporting plugins and handles test logging and results. Configuration for this class can be passed in directly via AftConfig or specified in aftconfig.json like:

// aftconfig.json
{
...
"logLevel": "info"
...
}

NOTE:

multiple instances of this class are expected to be created as each instance should have a unique name associated with it. Ex:

const r1 = new ReportingManager('reporter for test 1');
const r2 = new ReportingManager('reporter for test 2');

Hierarchy

  • ReportingManager

Constructors

Properties

_initialised: boolean
_stepCount: number = 0
aftCfg: AftConfig

the AftConfig instance used by this instance

logger: AftLogger

the console logger used by this ReportingManager

name: string

the name sent to all ReportingPlugin function calls and used to create this instance's AftLogger

plugins: ReportingPlugin[]

an array of enabled ReportingPlugin instances

Accessors

  • get logLevel(): "trace" | "debug" | "info" | "step" | "warn" | "pass" | "fail" | "error" | "none"
  • the LogLevel governing output to this instance's console logger. the value can be modified by passing in a custom AftConfig instance where the logLevel has been set or by simply specifying a logLevel in your aftconfig.json

    Returns "trace" | "debug" | "info" | "step" | "warn" | "pass" | "fail" | "error" | "none"

Methods

  • function will log to the console and then send the LogLevel, message and data on to any loaded ReportingPlugin objects

    Parameters

    • level: "trace" | "debug" | "info" | "step" | "warn" | "pass" | "fail" | "error" | "none"

      the LogLevel of this message

    • message: string

      the string to be logged

    • Rest ...data: any[]

      an array of additional data to be included in the logs

    Returns Promise<void>

  • calls the log function with a LogLevel of trace

    NOTE

    this is typically reserved for AFT internal systems and will result in much more verbose logs if enabled

    Parameters

    • message: string

      the message to be logged

    • Rest ...data: any[]

    Returns Promise<void>

Generated using TypeDoc