I am trying to do a test using Playwright. I understand that when I run the test, a HTML report should be automatically generated and saved in the playwright-report folder, and a XML report should be created in the playwright-tests folder. The HTML works okay, but the XML is not being created and the folder is empty.
This is the structure that I have:
[![enter image description here][1]][1]
And this is the playwright.configuration.js:
const { defineConfig } = require('@playwright/test');
module.exports = defineConfig({
testDir: './e2e/src/tests',
outputDir: 'playwright-tests',
webServer: {
command: 'ng serve -c production',
port: 4200,
timeout: 120 * 1000,
reuseExistingServer: true,
},
workers: 4,
use: {
baseURL: 'https://xxx/',
storageState: 'e2e/.auth/storageState.json',
browserName: 'chromium',
headless: true,
viewport: { width: 1920, height: 1080 },
ignoreHTTPSErrors: true,
screenshot: 'only-on-failure',
video: 'on',
},
reporter: [
['list'],
['html', { outputFolder: '/playwright-report', open: 'never' }],
['junit', { outputFile: 'newresults.xml' }]
]
});
I am working in WSL, and I already gave permission to the folders to write on them.
What can I do to fix this and get the XML report?
Thanks!
[1]: https://i.sstatic.net/51ysy6jH.png