Just like the core design patterns in your Serenity/JS scenarios revolve around the system metaphor of a stage performance, Serenity/JS reporting services follow the metaphor of a stage crew.
StageCrewMembers observe the actors on
Activities they perform, and listen to the domain events emitted by their environment.
They use the information they gather to generate artifacts, such as test reports,
produce more events to prompt other crew members to action, or perform side effects like printing to the terminal, writing files to disk, or performing network or database calls.
Several of the Serenity/JS modules provide
StageCrewMembers you can use for test reporting purposes:
- Console Reporter - writes text-based test reports to your computer terminal,
- Serenity BDD Reporter - emits Serenity BDD-compatible JSON reports, to be archived via
ArtifactArchiverand consumed by the Serenity BDD CLI to produce HTML reports and living documentation,
- Photographer - automatically captures screenshots of the web browser window used by the active actor, to be archived via
ArtifactArchiverand attached to Serenity BDD reports
- Artifact Archiver - stores report artifacts on disk,
- Stream Reporter - logs any events it receives to help you with debugging.
You might want to study the above examples to create your own
StageCrewMembers to produce custom reports or send the results to external reporting or storage systems.