Skip to content

feat(vscode): add test recognition to vscode#5019

Merged
benfdking merged 1 commit intomainfrom
adding_testing_to_vscode
Jul 28, 2025
Merged

feat(vscode): add test recognition to vscode#5019
benfdking merged 1 commit intomainfrom
adding_testing_to_vscode

Conversation

@benfdking
Copy link
Contributor

@benfdking benfdking commented Jul 25, 2025

Clipboard-20250728-153210-711

@benfdking benfdking force-pushed the adding_testing_to_vscode branch 2 times, most recently from 217e04c to d0af399 Compare July 28, 2025 15:33
Copy link
Contributor Author

@benfdking benfdking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small tweaks to improve

@benfdking benfdking force-pushed the adding_testing_to_vscode branch from d0af399 to 5c3eebc Compare July 28, 2025 17:20
@benfdking benfdking marked this pull request as ready for review July 28, 2025 17:20
@benfdking benfdking force-pushed the adding_testing_to_vscode branch from 5c3eebc to b0ad05b Compare July 28, 2025 17:29
@benfdking benfdking requested a review from Copilot July 28, 2025 17:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds test recognition and execution capabilities to the VS Code extension, enabling users to discover, view, and run SQLMesh tests directly within the editor's test runner interface.

  • Implements LSP methods for listing workspace tests, document-specific tests, and running individual tests
  • Adds VS Code test controller integration to display tests in the Test Explorer panel
  • Creates test range detection functionality to provide accurate line number mappings for test entries

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
vscode/extension/tests/tests.spec.ts End-to-end test for the new test functionality
vscode/extension/src/tests/tests.ts Main test controller implementation for VS Code
vscode/extension/src/lsp/lsp.ts Type casting fix for error handling
vscode/extension/src/lsp/custom.ts TypeScript interface definitions for new LSP methods
vscode/extension/src/extension.ts Integration of test controller into the extension
tests/lsp/test_context.py Unit tests for LSP context test methods
sqlmesh/lsp/tests_ranges.py YAML parsing utility for extracting test ranges
sqlmesh/lsp/main.py LSP server handlers for test-related methods
sqlmesh/lsp/custom.py Python class definitions for LSP test methods
sqlmesh/lsp/context.py Core test discovery and execution logic

@benfdking benfdking force-pushed the adding_testing_to_vscode branch from 52a2520 to d1dce74 Compare July 28, 2025 21:20
@benfdking benfdking enabled auto-merge (squash) July 28, 2025 21:32
@benfdking benfdking merged commit 8f2947b into main Jul 28, 2025
27 checks passed
@benfdking benfdking deleted the adding_testing_to_vscode branch July 28, 2025 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants