You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a file called Test.ql, and I see this file show up in the "Testing" window. I can click on the run button in that window and have my test run. However, it would be convenient if there was a keyboard shortcut that would run the open query as a test if it was a test. I checked the commands under codeQLTests.* and didn't see anything I could bind to a key to do this.
@gsingh93@aeisenberg I have looked upon this issue. For adding a keyboard shortcut you need to follow the following steps:
Open the Keyboard Shortcuts Settings: Press Ctrl + K followed by Ctrl + S to open the Keyboard Shortcuts settings in Visual Studio Code(May vary on the ide you are using). Alternatively, you can go to the menu and select File -> Preferences -> Keyboard Shortcuts.
Search for the Command: In the Keyboard Shortcuts settings, there is a search box. Enter a relevant keyword, such as "testing" or "run test"
Assign a Keybinding: assign a key binding to the command testing.run, by clicking the + button.
Define the Keybinding: Enter the desired key combination for the shortcut in the text input field. Ensure that the key combination you choose is not conflicting with any existing keybindings. For example, you can use "Ctrl+Shift+T" or "Cmd+Shift+T" (on Mac).
Save the Keybinding: Press Enter to save the new keybinding.
Verify and Apply Changes: Check that your new keybinding appears correctly in the list of keybindings. You can now close the Keyboard Shortcuts settings.
Thanks, I'm still having some issues with this though.
After binding testing.run to a key, opening up the test's QL file and pressing the key does nothing. I also tried the existing key binding for testing.runCurrentFile and that didn't work, I see a tooltip that says "No tests found in this file".
But opening up the command palette and running "Test Explorer: Run tests in current file" works. Are you able to reproduce this behavior? I'm not sure why the command palette command would work but the keybinding for it wouldn't.
Uh oh!
There was an error while loading. Please reload this page.
I have a file called
Test.ql
, and I see this file show up in the "Testing" window. I can click on the run button in that window and have my test run. However, it would be convenient if there was a keyboard shortcut that would run the open query as a test if it was a test. I checked the commands undercodeQLTests.*
and didn't see anything I could bind to a key to do this.#1026 (comment)
The text was updated successfully, but these errors were encountered: