import {ArtifactArchiver} from '@serenity-js/core/lib/stage/crew/artifact-archiver'
public class | source

ArtifactArchiver

Stores any Artifacts emitted via ArtifactGenerated events on the FileSystem

Implements:

Examples:

Registering ArtifactArchiver programmatically
 import { configure, StreamReporter } from '@serenity-js/core';

 configure({
     crew: [
         ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
     ],
 });
Registering ArtifactArchiver using Protractor configuration
 // protractor.conf.js
 const { ArtifactArchiver } = require('@serenity-js/core');

 exports.config = {
   framework:     'custom',
   frameworkPath: require.resolve('@serenity-js/protractor/adapter'),

   serenity: {
     crew: [
       ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
     ],
     // other Serenity/JS config
   },

   // other Protractor config
 };

Tests:

Static Method Summary

Static Public Methods
public static

storingArtifactsAt(destination: string[]): StageCrewMember

Instantiates an ArtifactArchiver storing artifacts in a given destination.

Constructor Summary

Public Constructor
public

constructor(fileSystem: FileSystem, stage: Stage)

Method Summary

Public Methods
public

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 StageManager.

Static Public Methods

public static storingArtifactsAt(destination: string[]): StageCrewMember source

Instantiates an ArtifactArchiver storing artifacts in a given destination. The destination directory will be created automatically and recursively if it doesn't exist.

Params:

NameTypeAttributeDescription
destination string[]

Returns:

StageCrewMember

Public Constructors

public constructor(fileSystem: FileSystem, stage: Stage) source

Params:

NameTypeAttributeDescription
fileSystem FileSystem
stage Stage
  • optional

The stage this StageCrewMember should be assigned to

Public Methods

public assignedTo(stage: Stage): StageCrewMember source

Creates a new instance of this StageCrewMember and assigns it to a given Stage.

Params:

NameTypeAttributeDescription
stage Stage

An instance of a Stage this StageCrewMember will be assigned to

Returns:

StageCrewMember

A new instance of this StageCrewMember

public notifyOf(event: DomainEvent): void source

Handles DomainEvent objects emitted by the StageManager.

Params:

NameTypeAttributeDescription
event DomainEvent

Returns:

void