Skip to content

Test failures are not properly reported #774

@Marcono1234

Description

@Marcono1234

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

  1. Clone https://github.com/github/codeql
  2. Delete cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/annotate_sinks_only/remote-flow-sink.expected
  3. Run only the corresponding test file remote-flow-sink.ql from 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions