-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Keyboard shortcut for running unit tests #14805
Comments
This would be hugely useful. Furthermore, a similar keyboard shortcut to run all tests in the current file (i.e. click the "Run Test" label at the top of the file) would be similarly useful. |
If I am not missing anything, the VS Code action called “Rust Analyzer: Run” is doing exactly this, and has been there since forever. The action is documented here: https://rust-analyzer.github.io/manual.html#run To bind it to a shortcut, use this config: |
The command 'rust-analyzer.run' adds a little complexity to the process of running the selected test. It first prompts the user to select a runnable that they want to execute, this can include tests and a number of other possible actions. The ask was explicitly for a command that would immediately run the selected test. While the existing run command allows the user to accomplish running the test without using the mouse, this new run selected test command would minimize the actions a user has to take. See run command.
|
+1 |
+1. This would be extremely useful. 'rust-analyzer.run' is not sufficient. The goal would be to bind a key to the 'Run Test' or 'Run Tests' button. |
I think this can be handled on the type-script side. Basically, we should add an optional argument to Useful links:
|
There is also a very useful "Tasks: Rerun last task" VS Code command that can be triggered with the keyboard after running the test with the mouse once. |
Currently, in order to run a unit test from within vscode, one must use the mouse, hover over the test function name they care about, and click Run Test. This is not very accessible, and also hurts the workflow of keyboard oriented developers.
I would like to suggest adding an action (that can have a keyboard shortcut attached to) called: Run selected test. This test will run the test the keyboard cursor is currently on.
Thanks for all the hard work!
The text was updated successfully, but these errors were encountered: