Artifact Archiver
ArtifactArchiver
, available as part of the @serenity-js/core
module, saves Artifacts
generated by other StageCrewMembers
to disk.
Installation
To install the module, run the following command in your computer terminal:
npm install --save-dev @serenity-js/core
Integration
ArtifactArchiver
listens to ArtifactGenerated
events
and emits ArtifactArchived
events upon success.
[ArtifactGenerated]" --> S subgraph "core" S -- "notifies
[ArtifactArchived]" --> SCM S -- "notifies
[ArtifactGenerated]" --> AA AA -- "notifies
[ArtifactArchived]" --> S end AA -- "writes
[files]" --> HDD class SCM socket click S "/modules/core" click AA "/modules/core/class/src/stage/crew/artifact-archiver/ArtifactArchiver.ts~ArtifactArchiver.html"
Usage
To use ArtifactArchiver
, register it as one of the StageCrewMembers
and provide a location on the file system where you'd like it to store the artifacts it receives.
import { configure, ArtifactArchiver } from '@serenity-js/core';
configure({
crew: [
ArtifactArchiver.storingArtifactsAt(__dirname, 'target/site/serenity'),
],
});
To learn more about the available configuration options, consult the ArtifactArchiver
API docs and its test suite.
You might also want to explore the example projects.
Love Serenity/JS? Spread the word on Twitter and LinkedIn!
Found a typo? You can fix it yourself or raise a ticket on GitHub.
If you'd like to help us bring more great tools and content to the Open-Source Community, become a GitHub Sponsor of Serenity/JS for as little as the cost of a cup of coffee.