Yes, it's normal to see a 'test-result' folder with 'trace.zip' for each test run in Playwright, even after disabling trace in the config file. This is because Playwright is set up to create a trace.zip file for each test run by default.
However, you can control this behavior through the configuration options in the playwright.config.ts
file. If you want to completely disable tracing, you can modify this file accordingly.
Here's how you can do it:
import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
trace: 'off',
},
});
By setting trace: 'off'
, Playwright will no longer generate trace.zip files for any tests.
Remember, if you have already executed tests with tracing enabled, disabling tracing will not remove those existing files. It only prevents new trace.zip files from being created during subsequent test runs.
So, to completely stop generating new trace.zip files, make sure to set trace: 'off'
in your playwright.config.ts
file.
If you still have questions, please ask a question and I will try to answer it.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].