Skip to content

Commit ab11068

Browse files
authored
Merge pull request #15749 from github/koesie10/update-testing-vscode-docs
Update documentation for testing CodeQL queries in VS Code
2 parents 297a179 + 6aeef17 commit ab11068

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

docs/codeql/codeql-for-visual-studio-code/testing-codeql-queries-in-visual-studio-code.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,31 @@ About testing queries in VS Code
1212

1313
To ensure that your CodeQL queries produce the expected results, you can run tests that compare the expected query results with the actual results.
1414

15-
The CodeQL extension automatically prompts VS Code to install the Test Explorer extension as a dependency. The Test Explorer displays any workspace folders with a name ending in ``-tests`` and provides a UI for exploring and running tests in those folders.
15+
The CodeQL extension automatically registers itself with the **Testing** view. The **Testing** view displays all tests found in your current workspace and provides a UI for exploring and running tests in your workspace.
1616

1717
For more information about how CodeQL tests work, see "`Testing custom queries <https://docs.github.com/en/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries>`__" in the CLI help.
1818

1919
Testing the results of your queries
2020
-----------------------------------
2121

22-
1. Open the Test Explorer view in the sidebar.
22+
1. Open the **Testing** view in the sidebar.
2323

24-
.. image:: ../images/codeql-for-visual-studio-code/open-test-explorer.png
24+
.. image:: ../images/codeql-for-visual-studio-code/open-testing-view.png
2525
:width: 350
26-
:alt: Open the Test Explorer view
26+
:alt: Open the Testing view
2727

2828
2. To run a specific test, hover over the file or folder name and click the play button. To run all tests in your workspace, click the play button at the top of the view. If a test takes too long to run, you can click the stop button at the top of the view to cancel the test.
29-
3. The icons show whether a test passed or failed. If it failed, right-click the failed test and click **CodeQL: Show Test Output Differences** to display the differences between the expected output and the actual output.
29+
3. The icons show whether a test passed or failed. If it failed, click the test in the **Test Results** panel to display the differences between the expected output and the actual output.
3030

31-
.. image:: ../images/codeql-for-visual-studio-code/show-test-diff.png
32-
:width: 400
33-
:alt: Show test output differences
31+
.. image:: ../images/codeql-for-visual-studio-code/test-results-panel.png
32+
:width: 800
33+
:alt: View the Test Results panel
34+
35+
4. Compare the results. If you want to update the test with the actual output, right-click the test in the **Testing** view and click **Accept Test Output**.
3436

35-
4. Compare the results. If you want to update the test with the actual output, click **CodeQL: Accept Test Output**.
37+
.. image:: ../images/codeql-for-visual-studio-code/accept-test-output.png
38+
:width: 400
39+
:alt: Acccept test output in the Testing view
3640

3741
Monitoring the performance of your queries
3842
------------------------------------------
Loading
Binary file not shown.
Loading
Binary file not shown.
Loading

0 commit comments

Comments
 (0)