-
Notifications
You must be signed in to change notification settings - Fork 229
Test failures are not properly reported #774
Description
Version
Extension Version: 1.4.3
CodeQL CLI Version: 2.4.4
Describe the bug
It appears the VSCode extension invokes CodeQL CLI with --format jsonz. With that format only a small portion of the information is written to stdout, most of the information is inside the JSON data. With #626 some of the JSON data is read, but apparently not all. Most notably, the extension is apparently not reading failureDescription.
This makes understanding test failures pretty difficult, for example when no .expected file exists (see also github/codeql#5343).
To Reproduce
- Clone https://github.com/github/codeql
- Delete
cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/annotate_sinks_only/remote-flow-sink.expected - Run only the corresponding test file
remote-flow-sink.qlfrom the "Test" tab of VSCode
❌ The output only says (roughly)0 tests passed; 1 tests failed:
FAILED: path/to/test.ql
failed: path/to/test.ql
Query produced no results.
Expected behavior
The VSCode extension should evaluate the failureDescription, if present, (and maybe more members of the JSON data) of the test result and inform the user.