Skip to content
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

[Feature]: Option to Exclude Specific Entries from Trace Report #2664

Open
DepravityDemo opened this issue Nov 23, 2024 · 1 comment
Open

Comments

@DepravityDemo
Copy link

DepravityDemo commented Nov 23, 2024

🚀 Feature Request

While using Playwright for testing, I have noticed that although the issue with ImplToApiMapping.wrapper_func entries has been resolved, the trace report still contains numerous Response.json entries in 1.49. These entries lack meaningful information, making it difficult to focus on the critical actions and events that require analysis.
Image

2024-11-23_19-43-42.zip

Proposed Feature:
I propose a new feature in Playwright’s trace configuration that allows users to exclude specific types of entries, such as Response.json. This could be implemented as a configurable filtering mechanism, enabling users to specify which methods or event types should be excluded from the trace output.

Benefits:

Improved Readability: By excluding unnecessary entries, users can more easily focus on critical actions and events.
Enhanced Debugging Efficiency: A cleaner trace report will help users identify and resolve issues more quickly.
User Customization: Providing flexible filtering options allows users to tailor the trace output according to their needs.
Reference:
This request is a follow-up to the previous issue discussed here: GitHub Issue #2650. I would like to express my gratitude to mxschmitt for addressing the ImplToApiMapping.wrapper_func issue. Your work has been greatly appreciated and has improved our testing process significantly.

I believe that implementing this feature would further enhance Playwright’s tracing capabilities and assist users in conducting more efficient test analyses. Thank you for considering this request.

Example

def handle_response(self, response):
json_data = response.json()
url = response.url

page.on('response', self.handle_response)

Motivation

Motivation:
The presence of these extraneous Response.json entries reduces the readability of the trace report and hinders the analysis of important events and responses during testing. Users need clearer trace reports to conduct more effective debugging and analysis.

@mxschmitt
Copy link
Member

Sounds similar to microsoft/playwright#33620 which we we'll do in v1.50. So we hide Response.* and Request.* events from the trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants