You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Playwright video recording output test result doesn't end up in the same directory as a trace.zip, which is separate directory for each test. Instead it's saved in parent directory which makes it difficult to identify which recording belongs to each test.
What did you expect to happen?
Playwright video recording output test result ends up in the same directory as a trace.zip, which supposed to be separate directory for each test.
Node.js version
v18.20.3
Execution environment
Windows 11 Enterprise, Version: 23H2, OS build: 22631.3593
Chromium Version 125.0.6422.26 (Developer Build) (64-bit)
How to reproduce the bug.
I'm using config in playwright.config.ts
import { devices } from '@playwright/test';
import type { PlaywrightTestConfig } from '@serenity-js/playwright-test';
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('dotenv').config();
/**
* See https://playwright.dev/docs/test-configuration.
*/
const config: PlaywrightTestConfig = {
testDir: './src/spec',
/* Maximum time one test can run for. */
timeout: 900_000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 60_000,
},
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.WORKERS? parseInt(process.env.WORKERS, 10): 1,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: [
// ['line'], // it will spam stdout but could be helpful
['junit', { outputFile: process.env.RESULTFILE ?? 'results.xml' }],
['@serenity-js/playwright-test', {
crew: [
'@serenity-js/console-reporter',
['@serenity-js/core:ArtifactArchiver', { outputDirectory: 'serenity-reporter' }],
'@serenity-js/core:StreamReporter', // use for debugging
]
.filter(val => val !== '@serenity-js/core:StreamReporter' || process.env.DEBUGMODE),
}],
],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
defaultActorName: 'Alice',
crew: [
// Take screenshots of failed Serenity/JS Activities, such as a failed assertion, or o failed interaction
['@serenity-js/web:Photographer', { strategy: 'TakePhotosOfFailures' }],
// Take screenshots of all the Activities, both successful and failed
// [ '@serenity-js/web:Photographer', { strategy: 'TakePhotosOfInteractions' }],
],
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on',
testIdAttribute: 'data-qa',
video: 'on',
contextOptions: {
recordVideo: {
dir: './test-results',
size: { width: 1500, height: 820 },
}
}
},
/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
viewport: {width: 1500, height: 820},
},
},
],
};
export default config;
The same config for "vanilla" playwright works correctly.
What happened?
Playwright video recording output test result doesn't end up in the same directory as a trace.zip, which is separate directory for each test. Instead it's saved in parent directory which makes it difficult to identify which recording belongs to each test.
What did you expect to happen?
Playwright video recording output test result ends up in the same directory as a trace.zip, which supposed to be separate directory for each test.
Node.js version
v18.20.3
Execution environment
Windows 11 Enterprise, Version: 23H2, OS build: 22631.3593
Chromium Version 125.0.6422.26 (Developer Build) (64-bit)
How to reproduce the bug.
I'm using config in playwright.config.ts
The same config for "vanilla" playwright works correctly.
Serenity/JS version
The text was updated successfully, but these errors were encountered: