How can I write unit tests for queries submitted to CodeQL repository #185
Answered
by
JLLeitschuh
JLLeitschuh
asked this question in
General
-
Are there ways to write CodeQL tests locally? |
Beta Was this translation helpful? Give feedback.
Answered by
JLLeitschuh
Sep 22, 2020
Replies: 1 comment
-
Yes! https://help.semmle.com/codeql/codeql-cli/procedures/test-queries.html Additionally, there is VS Code Support for running queries: https://help.semmle.com/codeql/codeql-for-vscode/procedures/testing-queries.html If the extractor has problems, or your test code fails to compile, the console output in VS Code won't tell you why you're having issues. You will want to look in the test directory your unit test is written under under |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
JLLeitschuh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes!
https://help.semmle.com/codeql/codeql-cli/procedures/test-queries.html
Additionally, there is VS Code Support for running queries:
https://help.semmle.com/codeql/codeql-for-vscode/procedures/testing-queries.html
If the extractor has problems, or your test code fails to compile, the console output in VS Code won't tell you why you're having issues. You will want to look in the test directory your unit test is written under under
tests.testproj/log
.