@wdio/spec-reporter
- Version 9.0.8
- Published
- 35.6 kB
- 5 dependencies
- MIT license
Install
npm i @wdio/spec-reporter
yarn add @wdio/spec-reporter
pnpm add @wdio/spec-reporter
Overview
A WebdriverIO plugin to report in spec style
Index
Classes
SpecReporter
- getColor()
- getCountDisplay()
- getEnviromentCombo()
- getEventsToReport()
- getFailureDisplay()
- getHeaderDisplay()
- getOrderedSuites()
- getResultDisplay()
- getSymbol()
- getTestLink()
- indent()
- onHookEnd()
- onRunnerEnd()
- onRunnerStart()
- onSuiteEnd()
- onSuiteStart()
- onTestFail()
- onTestPass()
- onTestSkip()
- onTestStart()
- printCurrentStats()
- printReport()
- setMessageColor()
Classes
class SpecReporter
class SpecReporter extends WDIOReporter {}
constructor
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.ResolvedTestrunnerCapabilities, 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
method getTestLink
getTestLink: ({ sessionId, isMultiremote, instanceName, capabilities,}: 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
Returns
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.
Badge
To add a badge like this oneto 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[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@wdio/spec-reporter)
- 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>
- Updated .
Package analyzed in 3426 ms. - Missing or incorrect documentation? Open an issue for this package.