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

Add support for refreshing tests in a single project/package/module. #21238

Open
mrburrito opened this issue May 12, 2023 · 5 comments
Open

Add support for refreshing tests in a single project/package/module. #21238

mrburrito opened this issue May 12, 2023 · 5 comments
Assignees
Labels
area-testing community ask Feature request that the community expressed interest in feature-request Request for new features or functionality needs proposal Need to make some design decisions

Comments

@mrburrito
Copy link

Currently, the "Refresh Tests" command and shortcut button in the test view refresh tests across the entire workspace. I have a mono-repo project that I open as a multi-root workspace and I would love to be able to refresh tests from only the specific part of the code I'm currently working as VSCode doesn't always pick up on changes.

The ideal solution would be to add a refresh shortcut next to every expandable test container in the testing view where the Run/Debug/GoTo buttons already pop up on mouseover that would just refresh discovery in that particular module.

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label May 12, 2023
@eleanorjboyd
Copy link
Member

Hello @mrburrito, thank you for the request. Currently the UI is handled by an API in vscode core, therefore I cannot make any changes to add that button to the test explorer. @connor4312 is this a request you have gotten before or should we create a new feature request for this in core?

In the meantime @mrburrito would it help if when you saved a file it only ran "refresh test" on that specific test file?

Thanks!

@eleanorjboyd eleanorjboyd added area-testing info-needed Issue requires more information from poster labels May 15, 2023
@connor4312
Copy link
Member

@eleanorjboyd this is actually something you can do by contributing to the testing/item/context menu. Though currently we don't expense the test or controller ID in the when clause, I'll put in a PR for that.

@mrburrito
Copy link
Author

The issue is more when VSCode doesn't refresh, which seems to happen more often when there's an error in the file and pytest can't discover tests. That's when I typically find myself wanting to refresh a specific subtree from the test explorer.

@eleanorjboyd eleanorjboyd added feature-request Request for new features or functionality needs community feedback Awaiting community feedback and removed triage-needed Needs assignment to the proper sub-team labels Sep 15, 2023
@github-actions
Copy link

Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

@brettcannon
Copy link
Member

Thank you to everyone who upvoted this issue! Since the community showed interest in this feature request we will leave this issue open as something to consider implementing at some point in the future.

We do encourage people to continue 👍 the first/opening comment as it helps us prioritize our work based on what the community seems to want the most.

@brettcannon brettcannon added needs proposal Need to make some design decisions community ask Feature request that the community expressed interest in and removed needs community feedback Awaiting community feedback labels Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing community ask Feature request that the community expressed interest in feature-request Request for new features or functionality needs proposal Need to make some design decisions
Projects
None yet
Development

No branches or pull requests

4 participants