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] Add Support for Partial Test Execution in Playwright VSCode Extension #23068

Open
loop-automation opened this issue May 16, 2023 · 1 comment

Comments

@loop-automation
Copy link

Feature Request: Add Support for Partial Test Execution in Playwright VSCode Extension

Description:
Users are currently facing a challenge where they need to re-run an entire Playwright test case every time they make a small adjustment to their code. This is particularly problematic when debugging issues in the middle or end of the test case, as it becomes time-consuming and inefficient.

The feature request is to add support for maintaining the test context open, allowing users to update their code and re-run the test from a specific line. This would mean they could re-run the same lines of code without having to execute the entire test from the start.

Example:
Let's say a user is testing a multi-step process on a webpage using Playwright. At one step, they need to retrieve data from a specific element and transform it into an array. If the test returns an unexpected result (e.g., an empty array), they would currently need to re-run the entire test after making adjustments to the code.

With this proposed feature, they could simply make the necessary adjustments and re-run the test from that specific step, saving considerable time and effort.

Possible Implementation:
To implement this feature, there could be a debug state that does not tear the context down after a run. Instead, when the test is rebooted from a specific line (after changes have been implemented), it just uses the open debug context. The user would need to make sure the context is set to the proper page for the test to pick up from.

A new UI element could be added to the Playwright VSCode extension interface, allowing users to select the starting line for their test. Maybe using start from a specific breakpoint? Alternatively, a command could be implemented to facilitate this process.

While this feature might seem to deviate from the traditional flow of JavaScript execution and the design of Playwright, it would undoubtedly provide a more efficient debugging process for developers.

We understand that implementing this feature might come with its own challenges and complexities, but it's worth exploring to improve the efficiency of the debugging process with Playwright.

@loop-automation loop-automation changed the title Feature Request: Add Support for Partial Test Execution in Playwright VSCode Extension [feature] Add Support for Partial Test Execution in Playwright VSCode Extension May 16, 2023
@loop-automation loop-automation changed the title [feature] Add Support for Partial Test Execution in Playwright VSCode Extension [Feature] Add Support for Partial Test Execution in Playwright VSCode Extension May 16, 2023
@loop-automation
Copy link
Author

Hey @dgozman - I was asked to clarify, certainly doesn't need to be implemented in the vscode extension. Wherever you feel has the best debug support is.

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

No branches or pull requests

2 participants