-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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]: Reusing page between tests when running serially adds extra teardown time per test #30635
Comments
@david-olink This is because you run tests in UI mode, which forces recording the trace, and tests after the first |
Thanks for the clarification of what is happening. I think it would be clearer if the "After Hooks" sections show that it is the trace that takes that long time.
I want speed up our testing as much as possible for our developers when running in UI mode, we also need the tests to be run serially. So that is why I want to remove any unnecessary overhead if possible :) |
We can look into this.
We are always keen to improve Playwright's performance, but we do not have any specific ideas about tracing right now.
Note that we strongly advise against the serial mode. Perhaps you just need to disable the parallelization with |
This includes two major changes: - reuse `SerializedFS` for live test runner tracing; - merge scheduled `appendFile` operations into a single `fs` call. In some cases, this improves performance of UI mode by 61% and performance of `trace: on` mode by 38%. Note that performance improvement on the average test will not be as noticeable. References #30875, #30635.
I'll tentatively close this given the improvements in #30946 that will be released in v1.45. If you encounter issues after upgrading to 1.45 once it's out, please file a new issue. |
Version
1.43.1
Steps to reproduce
Reusing page between tests when running serially, as described here https://playwright.dev/docs/test-retries#reuse-single-page-between-tests , adds extra time in in teardown for each test (even if the tests are empty).
Run this Test Suite:
Expected behavior
No test except the last should have a "After Hooks" that takes more than ~20ms instead of the ~700ms for the last tests as seen here:
Actual behavior
Running the above code adds extra "After Hooks" time as seen here:
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: