Skip to content

Add automated tests and CI for the extension #123

Description

@CatarinaGamboa

The extension has no automated tests, and CI only runs when a version tag is pushed (publish.yml). A change to the webview, the client, or the language server can break other features without anyone noticing until after release.

Goal: every push to any branch runs the most common checks, so regressions in the main features (verification diagnostics, the webview views, server startup, packaging) show up while the branch is being worked on, not after a merge. main only accepts PRs whose checks pass.

Approach, cheapest first:

  1. Tooling and CI plumbing: working lint, a PR workflow, required checks.
  2. Fast unit tests (seconds, no VS Code): webview render functions, webview script, server utilities.
  3. Integration tests in a real VS Code (minutes): the extension activates, the server starts, and Verify reports the expected diagnostics.
  4. Wider coverage: oldest supported VS Code version, lifecycle, Windows and macOS.

Full webview UI automation (WebdriverIO / vscode-extension-tester) is left out for now. The unit tests of the webview script cover most of that, at a fraction of the cost and flakiness.

References:

The sub-issues are ordered from easiest to hardest.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingTesting related

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions