Closed RodrigoOBC closed 7 months ago
@RodrigoOBC Are you using serial mode (see #14813) or persistent context (#11833) by any chance? If not, we would need a full self-contained repro to figure out the problem, not just a snippet from your config file.
Hi, I use in my tests parallelism. I always run with 3 set workers, and this is my complete configuration:
require('dotenv').config()
// @ts-check
const { devices } = require('@playwright/test');
const dotenv = require('dotenv');
const path = require('path');
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
dotenv.config({ path:path.join(__dirname,'utils', '.env') })
process.env.ALLURE_PROJECT_NAME = 'cofidential data';
/**
* @see https://playwright.dev/docs/test-configuration
* @type {import('@playwright/test').PlaywrightTestConfig}
*/
const config = {
globalTeardown: "./utils/global.teardown.js",
testDir: './features/tests/',
timeout: 99000,
expect: {
timeout: 99000
},
fullyParallel: true,
retries: parseInt(process.env.RETRIES) ,
reporter: [['line'],[
"allure-playwright",
{
detail: true,
outputFolder: "temp",
suiteTitle: false,
name: "Nexus",
environmentInfo: {
Node_Version: process.version,
OS: process.platform,
},
projectName: 'cofidential data'
},
]],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: process.env.BASE_URL,
trace: process.env.TRACEVIEW,
video: process.env.VIDEO,
screenshot: process.env.SCREENSHOT,
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
headless: true,
locale: 'pt-BR'
},
/* Configure projects for major browsers */
projects: [
{
name: 'chromium - En',
use: {
...devices['Desktop Chrome'],
viewport: { width: 1366, height: 768 },
locale:'en-US'
},
testMatch: '**/*.en.@(spec|test).?(c|m)[jt]s?(x)',
},
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
viewport: { width: 1366, height: 768 },
locale:'pt-BR'
},
testIgnore: ['**/*.en.@(spec|test).?(c|m)[jt]s?(x)'],
},
],
/* Folder for test artifacts such as screenshots, videos, traces, etc. */
outputDir: 'test-results/',
};
module.exports = config;
exemples env:
SCREENSHOT=only-on-failure
TRACEVIEW=retain-on-failure
VIDEO=retain-on-failure
@RodrigoOBC I don't see anything suspicious in this config, so we will need a full self-contained repro to tackle this issue. Otherwise, I will have to close it as non-reproducible.
We have to reproduce this issue locally to be able to debug it. If you can provide a full repro, please file a new issue by filling the "Bug Report" template, and link to this one.
Version
1.41.1
Steps to reproduce
Playwright ignores the video configuration within the playwright.config.js file. Inside my playwright.config.js file, I can put any information in the video key, and it ignores it as if nothing were there. This doesn't happen with screenshots and doesn't happen with traces, only with video.
I didn't include the entire config because it contains sensitive data. But if necessary, I can provide it with the data removed. In some research, it was mentioned that the following key-value pair needed to be added:
outputDir: 'test-results/',
I added it to my config, however, the result remains the same. It continues to ignore what I place there.
Expected behavior
Option to record the video when the test encounters a failure.
Actual behavior
The Playwright ignores the option to record videos of tests with failures.
Additional context
No response
Environment