import {SerenityBDDReporter} from '@serenity-js/serenity-bdd/lib/stage/crew/serenity-bdd-reporter'
SerenityBDDReporter
Produces Serenity BDD-standard JSON reports that Serenity BDD CLI Reporter can parse to produce HTML reports and living documentation.
Implements:
Examples:
Registering the reporter programmatically
import { ArtifactArchiver, configure } from '@serenity-js/core';
import { SerenityBDDReporter } from '@serenity-js/serenity-bdd';
configure({
crew: [
ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
new SerenityBDDReporter()
],
});
Registering the reporter using Protractor configuration
// protractor.conf.js
const
{ ArtifactArchiver } = require('@serenity-js/core'),
{ SerenityBDDReporter } = require('@serenity-js/serenity-bdd');
exports.config = {
framework: 'custom',
frameworkPath: require.resolve('@serenity-js/protractor/adapter'),
serenity: {
crew: [
ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
new SerenityBDDReporter(),
],
// other Serenity/JS config
},
// other Protractor config
};
Tests:
- SerenityBDDReporter
- SerenityBDDReporter
- SerenityBDDReporter
- SerenityBDDReporter captures information about scenario background
- SerenityBDDReporter captures the description of the scenario
- SerenityBDDReporter captures the narrative behind the scenario
- SerenityBDDReporter when reporting activities that took place during scenario execution reports the outcome of a single activity
- SerenityBDDReporter when reporting activities that took place during scenario execution reports the outcome of a sequence of several activities
- SerenityBDDReporter when reporting activities that took place during scenario execution reports the outcome of nested activities
- SerenityBDDReporter order of events records the events in a correct order
- SerenityBDDReporter order of events records the order of test steps so that the Serenity BDD reporter can display the reportData in the correct context
- SerenityBDDReporter artifacts records the arbitrary JSON data emitted during the interaction
- SerenityBDDReporter captures information about the business rule for single-scene scenarios
- SerenityBDDReporter captures information about a sequence of scenes (2 scenes in a sequence)
- SerenityBDDReporter determines the result of the sequence based on the worst result of the contributing scenarios
- SerenityBDDReporter ensures that context and tags are not duplicated despite having multiple scenarios in a sequence
- SerenityBDDReporter produces a SerenityBDDReport that can be tagged @manual is marked as automated (non-manual) by default
- SerenityBDDReporter produces a SerenityBDDReport that can be tagged @manual can be optionally tagged as manual
- SerenityBDDReporter produces a SerenityBDDReport that can be tagged @issue can be tagged with an issue number
- SerenityBDDReporter produces a SerenityBDDReport that can be tagged @arbitrary-tag can be tagged with an arbitrary tag
- SerenityBDDReporter produces a SerenityBDDReport that can be tagged to indicate that a scenario belongs to a feature
- SerenityBDDReporter produces a SerenityBDDReport that can be tagged to indicate that a scenario belongs to a capability
- SerenityBDDReporter produces a SerenityBDDReport that can be tagged to indicate that a scenario belongs to a theme
- SerenityBDDReporter produces a SerenityBDDReport that can be tagged to indicate that a scenario is executed in the context and indicates the web browser where the test was executed
- SerenityBDDReporter produces a SerenityBDDReport that can be tagged to indicate that a scenario is executed in the context and indicates the operating system where the test was executed
- SerenityBDDReporter produces a SerenityBDDReport that can be tagged to indicate that a scenario is executed in the context and ensures that the user-specified context takes precedence over browser context
- SerenityBDDReporter generates a SerenityBDDReport Artifact that is a valid artifact
- SerenityBDDReporter emits an ArtifactGenerated event that is separate for each scenario
- SerenityBDDReporter produces a SerenityBDDReport that at the scenario level contains the id of the scenario
- SerenityBDDReporter produces a SerenityBDDReport that at the scenario level contains the name of the scenario
- SerenityBDDReporter produces a SerenityBDDReport that at the scenario level contains the start time of the scenario
- SerenityBDDReporter produces a SerenityBDDReport that at the scenario level contains the duration of the scenario
- SerenityBDDReporter produces a SerenityBDDReport that describes the result of scenario execution that has finished with success
- SerenityBDDReporter produces a SerenityBDDReport that describes the result of scenario execution that hasn't been implemented yet
- SerenityBDDReporter produces a SerenityBDDReport that describes the result of scenario execution that has been ignored
- SerenityBDDReporter produces a SerenityBDDReport that describes the result of scenario execution that has been skipped
- SerenityBDDReporter produces a SerenityBDDReport that describes the result of scenario execution that has failed with an assertion error
- SerenityBDDReporter produces a SerenityBDDReport that describes the result of scenario execution that has been compromised
- SerenityBDDReporter produces a SerenityBDDReport that describes the result of scenario execution that has failed with a non-assertion error
- SerenityBDDReporter produces a SerenityBDDReport that describes the result of scenario execution that has been compromised
- SerenityBDDReporter produces a SerenityBDDReport that indicates its execution context specifies the test runner
- SerenityBDDReporter produces a SerenityBDDReport that indicates its execution context specifies the user story covered
- SerenityBDDReporter produces a SerenityBDDReport that indicates its execution context does not mention the user story path for non-Cucumber scenarios (as it breaks the Serenity BDD HTML report)
- SerenityBDDReporter produces a SerenityBDDReport that indicates its execution context reports information from the cucumber feature file reports the scenario-level narrative
- SerenityBDDReporter produces a SerenityBDDReport that indicates its execution context reports information from the cucumber feature file reports the scenario-level background title
- SerenityBDDReporter produces a SerenityBDDReport that indicates its execution context reports information from the cucumber feature file reports the scenario-level background description
Constructor Summary
Public Constructor | ||
public |
constructor(stage: Stage) |
Method Summary
Public Methods | ||
public |
assignedTo(stage: Stage): StageCrewMember Creates a new instance of this StageCrewMember and assigns it to a given Stage. |
|
public |
notifyOf(event: DomainEvent): void Handles DomainEvent objects emitted by the StageCrewMember. |
Public Constructors
Public Methods
public assignedTo(stage: Stage): StageCrewMember source
Creates a new instance of this StageCrewMember and assigns it to a given Stage.
Params:
Name | Type | Attribute | Description |
stage | Stage | An instance of a Stage this StageCrewMember will be assigned to |
See:
public notifyOf(event: DomainEvent): void source
Handles DomainEvent objects emitted by the StageCrewMember.
Params:
Name | Type | Attribute | Description |
event | DomainEvent |
Returns:
void |