publicConsoleReporter
Implements
- ListensToDomainEvents
Index
Methods
staticfromJSON
Parameters
config: ConsoleReporterConfig
Returns StageCrewMemberBuilder<ConsoleReporter>
staticwithDefaultColourSupport
Instantiates a
ConsoleReporter
that auto-detects your terminal’s support for colours and uses a colour theme for dark terminals if successful.Please note that spawning your test process from another process (by using npm-failsafe, for example) causes the
ConsoleReporter
to use the monochromatic colour scheme, as colour support can’t be detected in child processes.Returns StageCrewMemberBuilder<ConsoleReporter>
staticforMonochromaticTerminals
Instantiates a
ConsoleReporter
with a monochromatic colour theme. Good for terminals with no colour support (like thecmd.exe
on Windows), or for times when you need to pipe the output to a text file and want to avoid printing control characters.Returns StageCrewMemberBuilder<ConsoleReporter>
staticforDarkTerminals
Instantiates a
ConsoleReporter
with a colour theme optimised for terminals with dark backgrounds.Returns StageCrewMemberBuilder<ConsoleReporter>
staticforLightTerminals
Instantiates a
ConsoleReporter
with a colour theme optimised for terminals with light backgrounds.Returns StageCrewMemberBuilder<ConsoleReporter>
notifyOf
Handles DomainEvent objects emitted by the Stage.
Parameters
event: DomainEvent
Returns void
Constructors
constructor
Parameters
printer: Printer
theme: TerminalTheme
optionalstage: Stage
Returns ConsoleReporter
A StageCrewMember that uses standard output to report on progress of your Serenity/JS acceptance tests.
ConsoleReporter
ships with colour themes for both dark and light terminals, as well as a monochromatic theme for those moments when you’re in a noir mood (or have a terminal that doesn’t support colours, like the good oldcmd.exe
on Windows).Registering Console Reporter programmatically
Redirecting output to a file
Registering Console Reporter with Playwright Test
Registering Console Reporter with WebdriverIO
Registering Console Reporter with Protractor
Changing the default colour theme