Skip to main content

externalArtifactArchiver

Stores any artifacts emitted via ArtifactGenerated events on the file system.

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

externalconstructor

Methods

staticexternalstoringArtifactsAt

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


    Parameters

    • externalrest...destination: string[]

    Returns StageCrewMember

staticexternalfromJSON

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


    Parameters

    • externalconfig: { outputDirectory: string }
      • externaloutputDirectory: string

    Returns StageCrewMember

externalassignedTo

externalnotifyOf