New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Running npx playwright test --list creates test-results folder (and also allure-results) #30706
Comments
Agreed on this. I just updated Playwright while updating all dependencies across an entire project and running I've already configured Playwright to store output in an ignored directory, so this was an unfortunate surprise. In our case it happens that I had only configured the
I'm not saying the feature is good or bad, just that the introduction of a new file artifact added significant cognitive overhead to my maintenance work. I happen to be experienced enough that I can probably resolve this whole issue in 15 minutes (ignoring the time spent on filing this issue), but presumably a bunch of other people are all going through this process separately. If it's important to be able to keep this file and/or introduce new output files in point releases, I would suggest offering an output directory config that is inherited by all others, such as (Again, this isn't a criticism of the feature — I'm glad Playwright is actively maintained, and this kind of thing happens. I'm just trying to advocate caution for a sharp UX issue.) |
On closer inspection, it appears the
However:
|
Okay, in case anyone else runs into something like this, here's what I've learned by now:
A feature was added in Playwright v1.44.0 to rerun just the failed tests from last run. (Definitely a nice feature!) This feature writes a
No, this a single file specific to this feature. It so happens that this feature:
There is nothing in the implementing PRs or associated issues that implies other files could unexpectedly be written. If new files are written that are related to this feature, I presume they would also go into the
This file is written on every run by default. This is definitely convenient if you unexpectedly encounter some failing tests, and want to pass As far as I can tell, there is no way to prevent this file from being written. The only way to control where it's written is to specify an Again, this feature is unrelated to the JSON reporter, so this must be a separate directory from any import { defineConfig, devices } from "@playwright/test";
export default defineConfig({
// …
outputDir: ".temp/playwright/test-results",
reporter: [
["html", { outputFolder: "./.temp/playwright/report" }],
["json", { outputFile: "./.temp/playwright/report.json" }],
],
});
It looks like
That depends. The options seem to be:
|
Also, I'm not certain if any of my issues actually have anything to do with @urpizza's specific issues, as all my issues are with This issue was filed two days after v1.44.0 was released, though. So it's almost certainly the same root cause for the I have no idea about the |
Version
1.44.0
Steps to reproduce
Run
Running npx playwright test --list
Expected behavior
Not to create folders such as test-results, or allure-results (if added to config as reporter)
Actual behavior
Does create those files.
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: