Skip to content

Add integration test infrastructure and dev container#153

Open
c-schuler wants to merge 5 commits intomasterfrom
feature/integration-tests-dev-container
Open

Add integration test infrastructure and dev container#153
c-schuler wants to merge 5 commits intomasterfrom
feature/integration-tests-dev-container

Conversation

@c-schuler
Copy link
Copy Markdown

Summary

  • Adds Docker-based integration tests that exercise the full VS Code extension + language server pipeline (LSP communication, diagnostics, ELM translation, compiler options validation, multi-file compilation)
  • Adds a dev container configuration for developing across both vscode-cql and cql-language-server in a single reproducible environment
  • Adds file watcher scripts for automatic rebuilds of both the TypeScript extension and the language server JAR
  • Excludes integration tests from the default npm test run so CI unit tests are unaffected

Motivation

Previously there were no end-to-end tests covering the boundary between the extension and the language server. Each repo was tested in isolation with mocked interfaces. This gap allowed issues like compiler options not being applied to go undetected.

Test plan

  • docker compose up --build from integration-tests/ passes all 8 tests
  • npm test still runs unit tests without regressions (integration tests excluded)
  • Dev container opens successfully via Dev Containers: Reopen in Container
  • Watch All task rebuilds both projects on source changes
  • Rebuild Language Server task produces a working JAR and relinks it

@c-schuler c-schuler added the enhancement New feature or request label Mar 26, 2026
@github-actions
Copy link
Copy Markdown

Coverage after merging feature/integration-tests-dev-container into master will be

69.07%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   extension.api.ts100%100%100%100%
   extension.ts64.29%60%62.50%64.67%107–110, 131–133, 139–141, 146–148, 31–38, 41–63, 70–74, 84–91
   protocol.ts100%100%100%100%
   statusBar.ts100%100%100%100%
src/commands
   commands.ts100%100%100%100%
   execute-cql.ts36.24%100%45.45%32.08%100–105, 108–162, 165–253, 255–277, 323–328, 330–335, 41, 44, 47, 53–99
   log-files.ts70.09%58.33%60%72.22%24–29, 43–45, 50–53, 60–63, 69–71, 77–79, 84–90
   view-elm.ts94.44%100%100%93.33%12, 9
src/cql-language-server
   cqlLanguageClient.ts65.58%87.50%55.56%65.15%100–118, 122, 126–129, 141–146, 165–166, 173–177, 182–198, 37–39, 84, 88–99
   languageServerStarter.ts74.04%71.43%80%73.91%21–36, 44, 44–45, 71–77
src/cql-service
   cqlService.executeCql.ts73%100%66.67%70.79%10–34, 9
   cqlService.getElm.ts62.50%100%0%71.43%6–7
src/java-support
   findJavaRuntimes.ts55.58%66.67%78.57%53.31%100–104, 107–110, 120, 120–139, 14, 140–149, 15, 150–191, 197–213, 216–243, 251–253, 292–294, 320–322, 324–326, 332–334, 337–341, 346–362, 46–48, 78, 86–99
   javaServiceInstaller.ts94.29%72.73%100%96.57%124–126, 164–166, 173, 22–24, 60–61
   requirements.ts69.88%73.68%66.67%69.50%10–11, 115–128, 130–141, 55–68, 72–77
src/log-services
   logger.ts91.94%75%100%93.75%33–34, 37–39
   multi-transport-logger.ts83.57%100%53.33%86.09%100, 103–104, 107–108, 111–114, 55–56, 63–64, 95–96, 99
src/model
   testCase.ts95.24%94.12%100%95.35%82–86
src/utils
   file-utils.ts100%100%100%100%

Copy link
Copy Markdown
Member

@brynrhodes brynrhodes left a comment

Choose a reason for hiding this comment

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

integration tests work, npm test still works, but I'm getting an error trying to reopen in container (gets an error on trying to add the gid saying it already exists)

Copy link
Copy Markdown
Contributor

@raleigh-g-thompson raleigh-g-thompson left a comment

Choose a reason for hiding this comment

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

Please rebase on to v0.9.0.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants