Skip to content

Commit 5226c77

Browse files
committed
Update documentation for testing CodeQL queries in VS Code
1 parent 7be7640 commit 5226c77

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

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

Lines changed: 11 additions & 7 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 **Test Explorer** view. The **Test Explorer** 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 **Test Explorer** view in the sidebar.
2323

2424
.. image:: ../images/codeql-for-visual-studio-code/open-test-explorer.png
2525
:width: 350
2626
:alt: Open the Test Explorer 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 **Test Explorer** 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 Test Explorer view
3640

3741
Monitoring the performance of your queries
3842
------------------------------------------
56.6 KB
Loading
-20.7 KB
Loading
Binary file not shown.
111 KB
Loading

0 commit comments

Comments
 (0)