• Version 8.32.4
  • Published
  • 42 kB
  • 5 dependencies
  • MIT license


npm i @wdio/spec-reporter
yarn add @wdio/spec-reporter
pnpm add @wdio/spec-reporter


A WebdriverIO plugin to report in spec style



class SpecReporter

class SpecReporter extends WDIOReporter {}


    constructor(options: SpecReporterOptions);

      method getColor

      getColor: (state?: string) => ChalkColors;
      • Get a color based on a given state

        Parameter state

        Test state {String} State color

      method getCountDisplay

      getCountDisplay: (duration: string) => string[];
      • Get the display for passing, failing and skipped

        Parameter duration

        Duration string {Array} Count display

      method getEnviromentCombo

      getEnviromentCombo: (
      capability: Capabilities.RemoteCapability,
      verbose?: boolean,
      isMultiremote?: boolean
      ) => string;
      • Get information about the enviroment

        Parameter capability

        Parameter verbose

        Parameter isMultiremote

        {String} Enviroment string

      method getEventsToReport

      getEventsToReport: (suite: SuiteStats) => (HookStats | TestStats)[];
      • returns everything worth reporting from a suite

        Parameter suite

        test suite containing tests and hooks {Object[]} list of events to report

      method getFailureDisplay

      getFailureDisplay: () => string[];
      • Get display for failed tests, e.g. stack trace {Array} Stack trace output

      method getHeaderDisplay

      getHeaderDisplay: (runner: RunnerStats) => string[];
      • Get the header display for the report

        Parameter runner

        Runner data {Array} Header data

      method getOrderedSuites

      getOrderedSuites: () => SuiteStats[];
      • Get suites in the order they were called {Array} Ordered suites

      method getResultDisplay

      getResultDisplay: (prefaceString?: string) => string[];
      • Get the results from the tests

        Parameter suites

        Runner suites {Array} Display output list

      method getSymbol

      getSymbol: (state?: keyof Symbols) => string;
      • Get a symbol based on state

        Parameter state

        State of a test {String} Symbol to display

      getTestLink: ({
      }: TestLink) => string[];
      • get link to saucelabs job

      method indent

      indent: (uid: string) => string;
      • Indent a suite based on where how it's nested

        Parameter uid

        Unique suite key {String} Spaces for indentation

      method onHookEnd

      onHookEnd: (hook: HookStats) => void;

        method onRunnerEnd

        onRunnerEnd: (runner: RunnerStats) => void;

          method onRunnerStart

          onRunnerStart: (runner: RunnerStats) => void;

            method onSuiteEnd

            onSuiteEnd: () => void;

              method onSuiteStart

              onSuiteStart: (suite: SuiteStats) => void;

                method onTestFail

                onTestFail: (testStat: TestStats) => void;

                  method onTestPass

                  onTestPass: (testStat: TestStats) => void;

                    method onTestSkip

                    onTestSkip: (testStat: TestStats) => void;

                      method onTestStart

                      onTestStart: () => void;

                        method printCurrentStats

                        printCurrentStats: (stat: TestStats | HookStats | SuiteStats) => void;
                        • Print the report to the stdout realtime

                        method printReport

                        printReport: (runner: RunnerStats) => void;
                        • Print the report to the screen

                        method setMessageColor

                        setMessageColor: (message: string, state?: State) => string;
                        • Parameter state

                          state of test execution

                          Parameter msg

                          the message to print in terminal


                          colord value based on chalk to print in terminal

                        Package Files (1)

                        Dependencies (5)

                        Dev Dependencies (0)

                        No dev dependencies.

                        Peer Dependencies (0)

                        No peer dependencies.


                        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@wdio/spec-reporter.

                        • Markdown
                        • HTML
                          <a href="https://www.jsdocs.io/package/@wdio/spec-reporter"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>