Skip to content

Add a button to run a subset of tests #7188

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

Closed
rob-miller opened this issue Sep 4, 2019 · 4 comments
Closed

Add a button to run a subset of tests #7188

rob-miller opened this issue Sep 4, 2019 · 4 comments
Labels
area-testing feature-request Request for new features or functionality

Comments

@rob-miller
Copy link

Issue Type: Feature Request

For a large project with many unit tests, it would be nice if a subset of tests could be pre-selected and then run by clicking a button. Exactly like the current 'Run Tests' button in the bottom status bar (or perhaps a configuration option for it), but so that it only runs the tests (my chosen subset) relevant to the section of the project that I am currently working on.

Extension version: 2019.8.30787
VS Code version: Code 1.37.1 (f06011ac164ae4dc8e753a3fe7f9549844d15e35, 2019-08-15T16:16:34.800Z)
OS version: Darwin x64 18.7.0

@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Sep 4, 2019
@kimadeline kimadeline added area-testing needs decision feature-request Request for new features or functionality labels Sep 4, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Sep 4, 2019
@kimadeline
Copy link

Hello @rob-miller, thank you for the suggestion (I will also link the original ticket here: #7176)! We have marked this issue as "needs decision" to make sure we have a conversation about your idea. We plan to leave this feature request open for at least a month to see how many 👍 votes your idea gets to help us make our decision.

@kimadeline kimadeline changed the title one-button 'run tests subset' Add a button to run a subset of tests Sep 4, 2019
@DonJayamanne
Copy link

@rob-miller have you used the test explorer for running of tests, this allows you to run specific tests.
I feel that adding a ui to select specific tests is too specific. Generally one structures tests into suites (folders/files) and then run a specific suites or the like. The test explorer supports this.
Please do check it out, if you have done so, them please could you let is know how/why this doesn't meet your requirements so we can learn and improve on the current solution.

@rob-miller
Copy link
Author

@DonJayamanne Thanks, yes and the #7176 ticket raises an issue where (in my hands) running a file of tests from the test explorer does not appear to be running all the tests in the file. Leaving that bug out, the issue here is that I am collaborating on a large project (biopython) with 287 executable test files in the Tests subdirectory. Twelve of these are specific to the directory I'm working in and perhaps three directly hit code I'm likely to break. Despite the advice that 'tests should run quickly,' several of the 287 (and 1 of the 12) access web services so I've never managed to wait through running the complete set. This has been discussed on the group lists but isn't something I can fix (or I don't know how to do a simple local-only solution).

So for me the point of the 'run tests' button in the status bar is that I will hit it frequently - and I preach in #7176 why I think making unit testing super easy in VS Code is such a great thing to do. For one file of tests (mine for the module I'm developing) test explorer is fine, but the activation barrier rises exponentially with each additional out-of-list-sequence test file that I probably should run, so I fall back to never doing testing. Now the too-slow 'Run Tests' button becomes just a to-do sign listing another waiting task, when it could/should be an instant gratification hit when I break from coding.

I agree the selection UI is where the work is, for me I'm happy with a list of test file names in Settings but I expect normal people would prefer a right-click menu option or a checkbox next to the current run/play/open icons. If I've missed some kind of 'virtual folder' layer or other mechanism in test explorer to help with this I apologise.

@luabud
Copy link
Member

luabud commented Oct 30, 2019

Thanks for the suggestion 👍 but we decided not to move forward with this idea for now.

@luabud luabud closed this as completed Oct 30, 2019
@ghost ghost removed the needs decision label Oct 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants