Skip to main content

ArtifactArchiver

Stores any artifacts emitted via ArtifactGenerated events on the FileSystem.

Registering Artifact Archiver programmatically

import { ArtifactArchiver, configure } from '@serenity-js/core'

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

Using Artifact Archiver with Playwright Test

// playwright.config.ts
import type { PlaywrightTestConfig } from '@serenity-js/playwright-test'

const config: PlaywrightTestConfig = {
testDir: './spec',

reporter: [
[ '@serenity-js/playwright-test', {
crew: [
'@serenity-js/serenity-bdd',
[ '@serenity-js/core:ArtifactArchiver', { outputDirectory: 'target/site/serenity' } ],
]
// other Serenity/JS config
}]
],
// other Playwright Test config
}

Using Artifact Archiver with WebdriverIO

// wdio.conf.ts
import { WebdriverIOConfig } from '@serenity-js/webdriverio'

export const config: WebdriverIOConfig = {

framework: '@serenity-js/webdriverio',

serenity: {
crew: [
'@serenity-js/serenity-bdd',
[ '@serenity-js/core:ArtifactArchiver', { outputDirectory: 'target/site/serenity' } ],
]
// other Serenity/JS config
},
// other WebdriverIO config
}

Using Artifact Archiver with Protractor

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

serenity: {
crew: [
'@serenity-js/serenity-bdd',
[ '@serenity-js/core:ArtifactArchiver', { outputDirectory: 'target/site/serenity' } ],
],
// other Serenity/JS config
},
// other Protractor config
}

Implements

Index

Constructors

constructor

Methods

staticstoringArtifactsAt

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


    Parameters

    • rest...destination: string[]

    Returns StageCrewMember

staticfromJSON

  • Instantiates an ArtifactArchiver storing artifacts in a given outputDirectory. The outputDirectory will be created automatically and recursively if it doesn’t exist.


    Parameters

    • config: { outputDirectory: string }

    Returns StageCrewMember

assignedTo

notifyOf