I’m trying to customize the Playwright’s HTML report file name.
I’ve tried both fileName
and outputFile
settings but no luck.
I have to mention that when I set outputFolder
it changes the folder accordingly.
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
[
"html",
{
fileName: "test-results.html", // Not working
outputFile: "myFile.html", // Not working
outputFolder: "myFolder", // Working
},
],
});
In other reporters such as json
or junit
these settings works just fine:
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['json', { outputFile: 'test-results.json' }] // Working
],
});
I couldn’t find anything useful in Playwright Reporters Docs regarding this problem.