Skip to content

[Bug]: Add Copy Prompt Data to test-results.json for Custom Reports #35748

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

Open
esakkimuthu-m-19817 opened this issue Apr 25, 2025 · 1 comment

Comments

@esakkimuthu-m-19817
Copy link

Version

1.51.1

Steps to reproduce

There is no data for showing the copy prompt option for customized report

Expected behavior

We are currently using the test-results.json file to generate customized HTML reports from Playwright test executions. In our custom report, we have a "Copy Prompt" option that displays and allows users to copy relevant information (such as test name, status, error message, etc.).

However, this data is currently not available in the test-results.json file. In order to make this functionality fully dynamic and consistent across our reports, we need the copy prompt data to be included in test-results.json.

Actual behavior

Please include the data in test-results.json that can support the "Copy Prompt" option:

Use Case:

This enhancement will allow teams using custom reporting to fully replicate the Playwright report features, providing better consistency and usability for QA teams, developers, and stakeholders.

Additional context

No response

Environment

playwright
@agg23
Copy link
Contributor

agg23 commented Apr 25, 2025

Our prompt context is provided to tests as an attachment, currently named _error-context-\d+. You can see how our HTML reporter accesses it here: https://github.com/microsoft/playwright/blob/main/packages/html-reporter/src/testResultView.tsx#L168.

Is this sufficient for your use case?

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