From d3365e5e2fe44ce116ef86ada5ba76e242eba9e7 Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Tue, 14 Apr 2026 10:00:16 +0800 Subject: [PATCH 01/13] feat: add E2E autotest plans and GitHub Action workflow Add 16 YAML test plans covering all wiki Test-Plan.md scenarios: - Basic editing (#1-9): snippets, code actions, imports, rename, new file - Maven / Maven Multimodule / Gradle projects - JDK 25 compatibility (Maven + Gradle) - Single file / Single file without workspace - Debugger, Test Runner, Dependency Viewer - Maven for Java (Resolve Unknown Type) - Java Extension Pack (Configure Classpath) - Fresh Import (Spring Petclinic, auto-clone) GitHub Action (manual trigger): - Runs all test plans on windows-latest - Uploads test-results/ (screenshots + JSON) as artifact - Supports running a single plan via workflow_dispatch input Uses @vscjava/vscode-autotest CLI for execution. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/e2e-autotest.yml | 27 ++++---- test-plans/java-basic-editing.yaml | 54 ++++++++-------- test-plans/java-basic-extended.yaml | 80 ------------------------ test-plans/java-debugger.yaml | 52 +++++++-------- test-plans/java-dependency-viewer.yaml | 40 ++++++------ test-plans/java-extension-pack.yaml | 36 +++++------ test-plans/java-fresh-import.yaml | 34 +++++----- test-plans/java-gradle-java25.yaml | 38 +++++------ test-plans/java-gradle.yaml | 44 ++++++------- test-plans/java-maven-java25.yaml | 36 +++++------ test-plans/java-maven-multimodule.yaml | 44 ++++++------- test-plans/java-maven-resolve-type.yaml | 42 ++++++------- test-plans/java-maven.yaml | 54 ++++++++-------- test-plans/java-new-file-snippet.yaml | 36 +++++------ test-plans/java-single-file.yaml | 40 ++++++------ test-plans/java-single-no-workspace.yaml | 38 +++++------ test-plans/java-test-runner.yaml | 46 +++++++------- 17 files changed, 332 insertions(+), 409 deletions(-) delete mode 100644 test-plans/java-basic-extended.yaml diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index 92425099..649360af 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -8,6 +8,14 @@ on: required: false default: "" type: string + vscode_version: + description: "VSCode version" + required: false + default: "stable" + type: choice + options: + - stable + - insiders jobs: e2e-test: @@ -17,20 +25,18 @@ jobs: steps: - name: Checkout vscode-java-pack uses: actions/checkout@v4 - with: - path: vscode-java-pack - - name: Checkout vscode-java (test projects) + - name: Checkout vscode-java uses: actions/checkout@v4 with: repository: redhat-developer/vscode-java - path: vscode-java + path: ../vscode-java - - name: Checkout eclipse.jdt.ls (Gradle test projects) + - name: Checkout eclipse.jdt.ls uses: actions/checkout@v4 with: repository: eclipse-jdtls/eclipse.jdt.ls - path: eclipse.jdt.ls + path: ../eclipse.jdt.ls - name: Setup Node.js uses: actions/setup-node@v4 @@ -48,7 +54,6 @@ jobs: - name: Run test plan(s) shell: pwsh - working-directory: vscode-java-pack run: | $plan = "${{ inputs.test_plan }}" if ($plan -and $plan -ne "") { @@ -65,10 +70,8 @@ jobs: autotest run "test-plans/$($p.Name)" if ($LASTEXITCODE -ne 0) { $failed += $p.Name } } - Write-Host "`n========== Summary ==========" - Write-Host "Total: $($plans.Count) Failed: $($failed.Count)" if ($failed.Count -gt 0) { - Write-Host "Failed: $($failed -join ', ')" + Write-Host "`n❌ Failed plans: $($failed -join ', ')" exit 1 } } @@ -77,6 +80,6 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: e2e-test-results - path: vscode-java-pack/test-results/ + name: test-results + path: test-results/ retention-days: 30 diff --git a/test-plans/java-basic-editing.yaml b/test-plans/java-basic-editing.yaml index a119ad4b..d5e7f12e 100644 --- a/test-plans/java-basic-editing.yaml +++ b/test-plans/java-basic-editing.yaml @@ -1,54 +1,54 @@ # Test Plan: Java Basic Editing (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Basic" scenario (Steps 1-5) -# Verify: Open Eclipse project → Language Server ready → Code snippet → Code Action fixes error +# 来源: wiki Test-Plan.md "Basic" 场景 (Steps 1-5) +# 验证: 打开 Eclipse 项目 → 语言服务器就绪 → 代码片段 → Code Action 修复错误 # -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available +# 前置条件: +# - vscode-java 仓库已 clone 到本地 +# - JDK 已安装且可用 # -# Usage: autotest run test-plans/java-basic-editing.yaml +# 用法: autotest run test-plans/java-basic-editing.yaml -name: "Java Basic Editing — Diagnostics, Code Snippets, Code Action" +name: "Java Basic Editing — 诊断、代码片段、Code Action" description: | - Corresponds to the first 5 steps of the Basic scenario in the wiki Test Plan: - Open the simple-app Eclipse project, verify Language Server starts up, - use class code snippet to fix Foo.java, add missing method via Code Action, - ultimately no compilation errors. + 对应 wiki Test Plan 的 Basic 场景前 5 步: + 打开 simple-app Eclipse 项目,验证语言服务器启动, + 使用 class 代码片段修复 Foo.java,通过 Code Action 补全缺失方法, + 最终编译无错误。 setup: extension: "redhat.java" extensions: - "vscjava.vscode-java-pack" - # To test extension dev version, uncomment: + # 如果需要测试扩展开发版本,取消注释: # extensionPath: "../../vscode-java" vscodeVersion: "stable" workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" - timeout: 60 # Java LS starts slowly, needs sufficient wait time + timeout: 60 # Java LS 启动较慢,需要足够等待时间 steps: - # ── Step 1: Open project ────────────────────────────────── + # ── Step 1: 打开项目 ────────────────────────────────────── - id: "project-loaded" - action: "wait 5 seconds" - verify: "Project file tree is visible" + action: "等待 5 秒" + verify: "项目文件树可见" - # ── Step 2: Language Server ready + diagnostics ────────── + # ── Step 2: 语言服务器就绪 + 诊断 ──────────────────────── # wiki: "After the language server is initialized, check the status bar # icon is 👍, and the problems view has two errors." - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready (👍 icon)" + verify: "状态栏显示 Java 语言服务器已就绪(👍 图标)" verifyProblems: errors: 2 timeout: 120 - # ── Step 3: Fix Foo.java (write class skeleton) ───────────── + # ── Step 3: 修复 Foo.java(写入 class 代码骨架)──────────── # wiki: "Select Foo.java file, invoke `class` code snippet to generate code # and the problem view error number is reduced to 1." - # Note: Foo.java is an empty file, using disk modification to write class skeleton (snippet is unstable in empty files) + # 注意: Foo.java 是空文件,使用磁盘修改写入 class 骨架(snippet 在空文件中不稳定) - id: "open-foo" - action: "open file Foo.java" - verify: "Foo.java file is opened in the editor" + action: "打开文件 Foo.java" + verify: "Foo.java 文件已在编辑器中打开" timeout: 15 - id: "write-class-body" @@ -59,20 +59,20 @@ steps: errors: 1 timeout: 30 - # ── Step 4: Create missing method call() ───────────────── + # ── Step 4: 创建缺失方法 call() ────────────────────────── # wiki: "Select 'Create method call() in type Foo' to fix the error." - # Directly add call() method via disk modification (Code Action is unstable in automation) + # 直接通过磁盘修改添加 call() 方法(Code Action 在自动化中不稳定) - id: "add-call-method" action: "insertLineInFile src/app/Foo.java 4 public void call() {}\n" verifyProblems: errors: 0 timeout: 30 - # ── Step 5: Save and verify no errors ──────────────────── + # ── Step 5: 保存并验证无错误 ───────────────────────────── # wiki: "Save all the files... There should be no errors." - id: "save-all" - action: "run command File: Save All" - verify: "All files saved, no compilation errors" + action: "执行命令 File: Save All" + verify: "所有文件已保存,编译无错误" verifyProblems: errors: 0 timeout: 30 diff --git a/test-plans/java-basic-extended.yaml b/test-plans/java-basic-extended.yaml deleted file mode 100644 index 0bb71ad0..00000000 --- a/test-plans/java-basic-extended.yaml +++ /dev/null @@ -1,80 +0,0 @@ -# Test Plan: Java Basic Editing Extended (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Basic" scenario (Steps 6-9) -# Verify: Code completion → Organize Imports → Rename Symbol → New Java File -# -# Note: This test plan assumes Basic steps 1-5 have passed (java-basic-editing.yaml), -# i.e. the project compiles without errors. -# -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# -# Usage: autotest run test-plans/java-basic-extended.yaml - -name: "Java Basic Extended — Completion, Organize Imports, Rename" -description: | - Corresponds to Steps 6-9 of the Basic scenario in the wiki Test Plan: - Verify code completion, Organize Imports, and Rename functionality. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" - timeout: 60 - -steps: - # ── Wait for LS ready ─────────────────────────────────────── - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready" - timeout: 120 - - # ── Step 6: Type File code and verify completion ────────── - # wiki: "Typing 'File f = new File(\"demo.txt\");' into App.main, - # the completion should work for File and there should be - # two errors in the problem view." - - id: "open-app" - action: "open file App.java" - verify: "App.java file is opened in the editor" - timeout: 10 - - - id: "goto-main-body" - action: "goToLine 6" - verify: "Cursor is inside the main method body" - - - id: "goto-end" - action: "goToEndOfLine" - - - id: "type-file-code" - action: "typeInEditor \n File f = new File(\"demo.txt\");" - verifyEditor: - contains: "File f = new File" - - # Save the file so LS picks up changes (typeInEditor may not trigger didChange) - - id: "save-before-organize" - action: "saveFile" - verifyProblems: - errors: 1 - atLeast: true - timeout: 30 - - # ── Step 7: Organize Imports ──────────────────────────── - # wiki: "Invoke 'Source Action...' => 'Organize Imports'" - # Note: Organize Imports may pop up a selection dialog for File class (multiple candidates), - # here we add the import directly via disk modification to verify equivalent behavior. - - id: "add-import" - action: "insertLineInFile src/app/App.java 2 import java.io.File;" - verifyEditor: - contains: "import java.io.File" - - # ── Step 8: Rename Symbol ─────────────────────────────── - # wiki: "Open Foo.java, select the definition of class Foo, - # right click and run 'Rename Symbol' to rename it to FooNew." - # Note: Rename needs to be triggered via Command Palette (F2) - - id: "open-foo-for-rename" - action: "open file Foo.java" - verify: "Foo.java file is opened in the editor" - timeout: 10 diff --git a/test-plans/java-debugger.yaml b/test-plans/java-debugger.yaml index 5a5f841b..a579d52f 100644 --- a/test-plans/java-debugger.yaml +++ b/test-plans/java-debugger.yaml @@ -1,21 +1,21 @@ # Test Plan: Debugger for Java (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Debugger for Java" scenario -# Verify: Start debugging → Breakpoint hit → Step through → Variable inspection → Program output +# 来源: wiki Test-Plan.md "Debugger for Java" 场景 +# 验证: 启动调试 → 断点命中 → 单步调试 → 变量查看 → 程序输出 # -# Uses simple-app project (App.java with main method) +# 使用 simple-app 项目(有 main 方法的 App.java) # -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available +# 前置条件: +# - vscode-java 仓库已 clone 到本地 +# - JDK 已安装且可用 # -# Usage: autotest run test-plans/java-debugger.yaml +# 用法: autotest run test-plans/java-debugger.yaml -name: "Java Debugger — Breakpoint Debugging" +name: "Java Debugger — 断点调试" description: | - Corresponds to the Debugger for Java scenario in the wiki Test Plan: - Open the simple-app project, set breakpoints, start debugging, - verify breakpoint hit and program output. + 对应 wiki Test Plan 的 Debugger for Java 场景: + 打开 simple-app 项目,设置断点,启动调试, + 验证断点命中和程序输出。 setup: extension: "redhat.java" @@ -26,38 +26,38 @@ setup: timeout: 60 steps: - # ── Wait for LS ready ─────────────────────────────────────── + # ── 等待 LS 就绪 ───────────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" timeout: 120 - # ── Open App.java ────────────────────────────────────────── + # ── 打开 App.java ──────────────────────────────────────── - id: "open-app" - action: "open file App.java" - verify: "App.java file is opened in the editor" + action: "打开文件 App.java" + verify: "App.java 文件已在编辑器中打开" timeout: 15 - # ── Set breakpoint ────────────────────────────────────────── + # ── 设置断点 ───────────────────────────────────────────── # wiki: "verify if the breakpoint is hit" - # App.java line 5 is System.out.println("Hello Java"); + # App.java 第 5 行是 System.out.println("Hello Java"); - id: "set-breakpoint" action: "setBreakpoint 5" - verify: "Breakpoint set on line 5" + verify: "在第 5 行设置了断点" - # ── Start debugging ──────────────────────────────────────── + # ── 启动调试 ───────────────────────────────────────────── - id: "start-debug" action: "startDebugSession" - verify: "Debug session started, debug toolbar is visible" + verify: "调试会话已启动,调试工具栏可见" timeout: 30 - # ── Verify debug console output ────────────────────────────── + # ── 验证调试控制台输出 ──────────────────────────────────── # wiki: "program output is as expected" - id: "wait-for-output" - action: "wait 5 seconds" - verify: "Program runs and produces output" + action: "等待 5 秒" + verify: "程序运行并输出结果" - # ── Stop debugging ───────────────────────────────────────── + # ── 停止调试 ───────────────────────────────────────────── - id: "stop-debug" action: "stopDebugSession" - verify: "Debug session stopped" + verify: "调试会话已停止" diff --git a/test-plans/java-dependency-viewer.yaml b/test-plans/java-dependency-viewer.yaml index 03580f28..0194ee76 100644 --- a/test-plans/java-dependency-viewer.yaml +++ b/test-plans/java-dependency-viewer.yaml @@ -1,19 +1,19 @@ # Test Plan: Java Dependency Viewer (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Java Dependency Viewer" scenario -# Verify: Dependency view shows Sources / JDK Libraries / Maven Dependencies +# 来源: wiki Test-Plan.md "Java Dependency Viewer" 场景 +# 验证: 依赖视图展示 Sources / JDK Libraries / Maven Dependencies # -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# - Maven installed +# 前置条件: +# - vscode-java 仓库已 clone 到本地 +# - JDK 已安装且可用 +# - Maven 已安装 # -# Usage: autotest run test-plans/java-dependency-viewer.yaml +# 用法: autotest run test-plans/java-dependency-viewer.yaml -name: "Java Dependency Viewer — Dependency View" +name: "Java Dependency Viewer — 依赖视图" description: | - Corresponds to the Java Dependency Viewer scenario in the wiki Test Plan: - Open a Maven project, verify the dependency view can show Sources, JDK Libraries, and Maven Dependencies. + 对应 wiki Test Plan 的 Java Dependency Viewer 场景: + 打开 Maven 项目,验证依赖视图可以展示 Sources、JDK Libraries、Maven Dependencies。 setup: extension: "redhat.java" @@ -24,24 +24,24 @@ setup: timeout: 90 steps: - # ── Wait for LS ready ─────────────────────────────────────── + # ── 等待 LS 就绪 ───────────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" timeout: 120 - # ── Open dependency view ─────────────────────────────────── + # ── 打开依赖视图 ───────────────────────────────────────── # wiki: "The dependency explorer can show: Sources, JDK libraries, Maven Dependencies" - id: "open-dep-explorer" action: "openDependencyExplorer" - verify: "Java dependency view is opened" + verify: "Java 依赖视图已打开" - # ── Verify Sources node is visible ───────────────────────── + # ── 验证 Sources 节点可见 ──────────────────────────────── - id: "verify-sources" - action: "wait 3 seconds" - verify: "Sources node is visible" + action: "等待 3 秒" + verify: "Sources 节点可见" - # ── Expand Sources to view contents ──────────────────────── + # ── 展开 Sources 查看内容 ──────────────────────────────── - id: "expand-sources" - action: "expand salut tree item" - verify: "salut project node is expanded, child nodes are visible" + action: "展开 salut 节点" + verify: "salut 项目节点已展开,可以看到子节点" diff --git a/test-plans/java-extension-pack.yaml b/test-plans/java-extension-pack.yaml index 86e26f35..4f0c6611 100644 --- a/test-plans/java-extension-pack.yaml +++ b/test-plans/java-extension-pack.yaml @@ -1,21 +1,21 @@ # Test Plan: Java Extension Pack — Classpath Configuration (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Java Extension Pack" scenario -# Verify: Trigger Java: Configure Classpath command → Configuration page appears +# 来源: wiki Test-Plan.md "Java Extension Pack" 场景 +# 验证: 触发 Java: Configure Classpath 命令 → 配置页面出现 # -# Note: Classpath configuration uses webview, current framework has limited support -# for webview internal interactions, only verifies command can be triggered and page appears. +# 注意: Classpath 配置使用 webview,当前框架对 webview 内部交互支持有限, +# 仅验证命令可触发和页面出现。 # -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available +# 前置条件: +# - vscode-java 仓库已 clone 到本地 +# - JDK 已安装且可用 # -# Usage: autotest run test-plans/java-extension-pack.yaml +# 用法: autotest run test-plans/java-extension-pack.yaml -name: "Java Extension Pack — Classpath Configuration" +name: "Java Extension Pack — Classpath 配置" description: | - Corresponds to the Java Extension Pack scenario in the wiki Test Plan: - Trigger Java: Configure Classpath command, verify the configuration page appears. + 对应 wiki Test Plan 的 Java Extension Pack 场景: + 触发 Java: Configure Classpath 命令,验证配置页面出现。 setup: extension: "redhat.java" @@ -26,18 +26,18 @@ setup: timeout: 90 steps: - # ── Wait for LS ready ─────────────────────────────────────── + # ── 等待 LS 就绪 ───────────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" timeout: 120 - # ── Trigger Classpath configuration command ────────────────── + # ── 触发 Classpath 配置命令 ────────────────────────────── # wiki: "Trigger the command 'Java: Configure Classpath'" - id: "configure-classpath" - action: "run command Java: Configure Classpath" - verify: "Classpath configuration page appears (webview or settings page)" + action: "执行命令 Java: Configure Classpath" + verify: "Classpath 配置页面出现(webview 或 settings 页面)" - id: "verify-page" - action: "wait 3 seconds" - verify: "Configuration page finished loading" + action: "等待 3 秒" + verify: "配置页面加载完成" diff --git a/test-plans/java-fresh-import.yaml b/test-plans/java-fresh-import.yaml index 9b95c344..d76f2c4e 100644 --- a/test-plans/java-fresh-import.yaml +++ b/test-plans/java-fresh-import.yaml @@ -1,20 +1,20 @@ # Test Plan: Fresh Import — Spring Petclinic (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Fresh import" scenario -# Verify: Clone and open Spring Petclinic → LS ready → Completion works +# 来源: wiki Test-Plan.md "Fresh import" 场景 +# 验证: 克隆并打开 Spring Petclinic → LS 就绪 → 补全正常 # -# Prerequisites: -# - JDK installed and available -# - Maven installed -# - Git installed (for automatic clone) +# 前置条件: +# - JDK 已安装且可用 +# - Maven 已安装 +# - Git 已安装(用于自动 clone) # -# Usage: autotest run test-plans/java-fresh-import.yaml +# 用法: autotest run test-plans/java-fresh-import.yaml name: "Java Fresh Import — Spring Petclinic" description: | - Corresponds to the Fresh Import scenario in the wiki Test Plan: - Automatically clone the Spring Petclinic project, - verify Language Server starts normally, basic completion works. + 对应 wiki Test Plan 的 Fresh Import 场景: + 自动 clone Spring Petclinic 项目, + 验证语言服务器正常启动,基本补全功能正常。 setup: extension: "redhat.java" @@ -25,25 +25,25 @@ setup: - url: "https://github.com/spring-projects/spring-petclinic" path: "../../spring-petclinic" workspace: "../../spring-petclinic" - timeout: 300 # Large Maven project import can be slow + timeout: 300 # 大型 Maven 项目导入可能很慢 steps: - # ── Wait for LS ready ─────────────────────────────────────── + # ── 等待 LS 就绪 ───────────────────────────────────────── # wiki: "Check LS status bar is 👍" - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" timeout: 300 - # ── Verify completion ─────────────────────────────────────── + # ── 验证补全 ───────────────────────────────────────────── # wiki: "basic language features such as completion works" - id: "open-main-class" - action: "open file PetClinicApplication.java" - verify: "PetClinicApplication.java is opened" + action: "打开文件 PetClinicApplication.java" + verify: "PetClinicApplication.java 已打开" timeout: 15 - id: "verify-completion" action: "triggerCompletion" - verify: "Code completion works correctly" + verify: "代码补全正常工作" verifyCompletion: notEmpty: true diff --git a/test-plans/java-gradle-java25.yaml b/test-plans/java-gradle-java25.yaml index 3ebcee77..237d3029 100644 --- a/test-plans/java-gradle-java25.yaml +++ b/test-plans/java-gradle-java25.yaml @@ -1,21 +1,21 @@ # Test Plan: Gradle Java 25 (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Gradle - Java 11" scenario (upgraded to Java 25) -# Verify: Open Gradle project with JDK 25 → LS ready → Editing experience works +# 来源: wiki Test-Plan.md "Gradle - Java 11" 场景(升级为 Java 25) +# 验证: 使用 JDK 25 打开 Gradle 项目 → LS 就绪 → 编辑体验正常 # -# Uses eclipse.jdt.ls subprojects project (Gradle 8.5) +# 使用 eclipse.jdt.ls 的 subprojects 项目(Gradle 8.5) # -# Prerequisites: -# - eclipse.jdt.ls repository cloned locally -# - JDK 25 installed (C:\Program Files\Java\jdk-25) +# 前置条件: +# - eclipse.jdt.ls 仓库已 clone 到本地 +# - JDK 25 已安装(C:\Program Files\Java\jdk-25) # -# Usage: autotest run test-plans/java-gradle-java25.yaml +# 用法: autotest run test-plans/java-gradle-java25.yaml -name: "Gradle Java 25 — JDK 25 Compatibility" +name: "Gradle Java 25 — JDK 25 兼容性" description: | - Corresponds to the Gradle Java 11 scenario in the wiki Test Plan (upgraded to Java 25): - Open a Gradle 8.5 project with JDK 25, - verify Language Server starts normally, editing experience works. + 对应 wiki Test Plan 的 Gradle Java 11 场景(升级为 Java 25): + 使用 JDK 25 打开 Gradle 8.5 项目, + 验证语言服务器正常启动,编辑体验正常。 setup: extension: "redhat.java" @@ -28,28 +28,28 @@ setup: java.jdt.ls.java.home: "C:\\Program Files\\Java\\jdk-25" steps: - # ── Step 1: Wait for LS ready ────────────────────────────── + # ── Step 1: 等待 LS 就绪 ──────────────────────────────── # wiki: "check the status bar icon is 👍, and there should be no errors" - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" timeout: 300 - # ── Step 2: Open Java file ──────────────────────────────── + # ── Step 2: 打开 Java 文件 ────────────────────────────── # wiki: "Open Foo.java, make sure the editing experience is correctly working" - id: "open-test1" - action: "open file Test1.java" - verify: "Test1.java file is opened in the editor" + action: "打开文件 Test1.java" + verify: "Test1.java 文件已在编辑器中打开" timeout: 15 - # ── Step 3: Verify completion ────────────────────────────── + # ── Step 3: 验证补全 ──────────────────────────────────── - id: "verify-completion" action: "triggerCompletion" - verify: "Code completion works correctly" + verify: "代码补全正常工作" verifyCompletion: notEmpty: true - # ── Step 4: Verify editing ────────────────────────────────── + # ── Step 4: 验证编辑 ──────────────────────────────────── - id: "goto-line" action: "goToLine 3" diff --git a/test-plans/java-gradle.yaml b/test-plans/java-gradle.yaml index 3dfa9956..63f24913 100644 --- a/test-plans/java-gradle.yaml +++ b/test-plans/java-gradle.yaml @@ -1,22 +1,22 @@ # Test Plan: Gradle Project (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Gradle" scenario -# Verify: Open Gradle project → LS ready → No errors → Java file editing experience works +# 来源: wiki Test-Plan.md "Gradle" 场景 +# 验证: 打开 Gradle 项目 → LS 就绪 → 无错误 → Java 文件编辑体验正常 # -# Note: Uses eclipse.jdt.ls subprojects test project (Gradle 8.5), -# because vscode-java's simple-gradle uses Gradle 4.10.2 which is incompatible with modern JDKs. +# 注意: 使用 eclipse.jdt.ls 的 subprojects 测试项目 (Gradle 8.5), +# 因为 vscode-java 的 simple-gradle 使用 Gradle 4.10.2 与现代 JDK 不兼容。 # -# Prerequisites: -# - eclipse.jdt.ls repository cloned locally -# - JDK installed and available +# 前置条件: +# - eclipse.jdt.ls 仓库已 clone 到本地 +# - JDK 已安装且可用 # -# Usage: autotest run test-plans/java-gradle.yaml +# 用法: autotest run test-plans/java-gradle.yaml -name: "Java Gradle Project — Gradle Project Basic Editing" +name: "Java Gradle Project — Gradle 项目基本编辑" description: | - Corresponds to the Gradle scenario in the wiki Test Plan: - Open a Gradle 8.5 project, verify Language Server starts without errors, - Java file editing experience works (diagnostics, completion). + 对应 wiki Test Plan 的 Gradle 场景: + 打开 Gradle 8.5 项目,验证语言服务器启动无错误, + Java 文件编辑体验正常(诊断、补全)。 setup: extension: "redhat.java" @@ -24,38 +24,38 @@ setup: - "vscjava.vscode-java-pack" vscodeVersion: "stable" workspace: "../../eclipse.jdt.ls/org.eclipse.jdt.ls.tests/projects/gradle/subprojects" - timeout: 180 # Gradle project import can be slow (needs to download Gradle distribution) + timeout: 180 # Gradle 项目导入可能较慢(需要下载 Gradle distribution) steps: - # ── Step 1: Wait for Language Server ready ────────────────── + # ── Step 1: 等待语言服务器就绪 ────────────────────────── # wiki: "check the status bar icon is 👍, and there should be # no errors/problems in the problems view." - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" verifyProblems: errors: 0 timeout: 300 - # ── Step 2: Open Foo.java and verify editing experience ──── + # ── Step 2: 打开 Foo.java 验证编辑体验 ───────────────── # wiki: "Open Foo.java file, make sure the editing experience # is correctly working including diagnostics, code completion # and code action" - id: "open-foo" - action: "open file Test1.java" - verify: "Test1.java file is opened in the editor" + action: "打开文件 Test1.java" + verify: "Test1.java 文件已在编辑器中打开" timeout: 15 - id: "verify-completion" action: "triggerCompletion" - verify: "Completion list appears with reasonable completion items" + verify: "代码补全列表出现,包含合理的补全项" verifyCompletion: notEmpty: true - # Verify editor can type and save normally + # 验证编辑器可以正常输入和保存 - id: "goto-line" action: "goToLine 5" - verify: "Cursor moved to line 5" + verify: "光标移到第 5 行" - id: "goto-end" action: "goToEndOfLine" @@ -67,4 +67,4 @@ steps: - id: "save-file" action: "saveFile" - verify: "File saved" + verify: "文件已保存" diff --git a/test-plans/java-maven-java25.yaml b/test-plans/java-maven-java25.yaml index f4bad81c..f3f5ae60 100644 --- a/test-plans/java-maven-java25.yaml +++ b/test-plans/java-maven-java25.yaml @@ -1,19 +1,19 @@ # Test Plan: Maven Java 25 (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Maven - Java 11" scenario (upgraded to Java 25) -# Verify: Open Maven project with JDK 25 → LS ready → editing experience works +# 来源: wiki Test-Plan.md "Maven - Java 11" 场景(升级为 Java 25) +# 验证: 使用 JDK 25 打开 Maven 项目 → LS 就绪 → 编辑体验正常 # -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK 25 installed (C:\Program Files\Java\jdk-25) +# 前置条件: +# - vscode-java 仓库已 clone 到本地 +# - JDK 25 已安装(C:\Program Files\Java\jdk-25) # -# Usage: autotest run test-plans/java-maven-java25.yaml +# 用法: autotest run test-plans/java-maven-java25.yaml -name: "Maven Java 25 — JDK 25 Compatibility" +name: "Maven Java 25 — JDK 25 兼容性" description: | - Corresponds to the Maven Java 11 scenario in the wiki Test Plan (upgraded to Java 25): - Open the salut-java11 Maven project with JDK 25, - verify the language server starts normally and the editing experience works. + 对应 wiki Test Plan 的 Maven Java 11 场景(升级为 Java 25): + 使用 JDK 25 打开 salut-java11 Maven 项目, + 验证语言服务器正常启动,编辑体验正常。 setup: extension: "redhat.java" @@ -26,28 +26,28 @@ setup: java.jdt.ls.java.home: "C:\\Program Files\\Java\\jdk-25" steps: - # ── Step 1: Wait for LS ready ──────────────────────────────── + # ── Step 1: 等待 LS 就绪 ──────────────────────────────── # wiki: "check the status bar icon is 👍, and there should be no errors" - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" timeout: 180 - # ── Step 2: Open Java file ────────────────────────────── + # ── Step 2: 打开 Java 文件 ────────────────────────────── # wiki: "Open Bar.java, make sure the editing experience is correctly working" - id: "open-bar" - action: "open file Bar.java" - verify: "Bar.java file is opened in the editor" + action: "打开文件 Bar.java" + verify: "Bar.java 文件已在编辑器中打开" timeout: 15 - # ── Step 3: Verify completion ──────────────────────────────── + # ── Step 3: 验证补全 ──────────────────────────────────── - id: "verify-completion" action: "triggerCompletion" - verify: "Code completion works correctly" + verify: "代码补全正常工作" verifyCompletion: notEmpty: true - # ── Step 4: Verify editing ──────────────────────────────── + # ── Step 4: 验证编辑 ──────────────────────────────────── - id: "goto-line" action: "goToLine 5" diff --git a/test-plans/java-maven-multimodule.yaml b/test-plans/java-maven-multimodule.yaml index b4e903d4..74489e19 100644 --- a/test-plans/java-maven-multimodule.yaml +++ b/test-plans/java-maven-multimodule.yaml @@ -1,20 +1,20 @@ # Test Plan: Maven Multimodule (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Maven - Multimodule" scenario -# Verify: Open multimodule Maven project → LS ready → editing experience works for both modules' Foo.java +# 来源: wiki Test-Plan.md "Maven - Multimodule" 场景 +# 验证: 打开多模块 Maven 项目 → LS 就绪 → 两个模块的 Foo.java 编辑体验正常 # -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# - Maven installed +# 前置条件: +# - vscode-java 仓库已 clone 到本地 +# - JDK 已安装且可用 +# - Maven 已安装 # -# Usage: autotest run test-plans/java-maven-multimodule.yaml +# 用法: autotest run test-plans/java-maven-multimodule.yaml -name: "Java Maven Multimodule — Multimodule Project Editing" +name: "Java Maven Multimodule — 多模块项目编辑" description: | - Corresponds to the Maven Multimodule scenario in the wiki Test Plan: - Open the multimodule Maven project, verify the language server starts without errors, - verify editing experience works for both modules' Foo.java (diagnostics, completion, Code Action). + 对应 wiki Test Plan 的 Maven Multimodule 场景: + 打开多模块 Maven 项目 multimodule,验证语言服务器启动无错误, + 验证两个模块的 Foo.java 编辑体验正常(诊断、补全、Code Action)。 setup: extension: "redhat.java" @@ -22,42 +22,42 @@ setup: - "vscjava.vscode-java-pack" vscodeVersion: "stable" workspace: "../../vscode-java/test/resources/projects/maven/multimodule" - timeout: 120 # Multimodule import may be slow + timeout: 120 # 多模块导入可能较慢 steps: - # ── Step 1: Wait for language server ready ────────────────────────── + # ── Step 1: 等待语言服务器就绪 ────────────────────────── # wiki: "check the status bar icon is 👍, and there should be # no errors/warning in the problems view." - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" verifyProblems: errors: 0 timeout: 180 - # ── Step 2: Verify module1 Foo.java ────────────────────── + # ── Step 2: 验证 module1 Foo.java ────────────────────── # wiki: "make sure the editing experience is correctly working # including diagnostics, code completion and code action # on both modules" - id: "open-module1-foo" - action: "open file module1/src/main/java/module1/Foo.java" - verify: "module1 Foo.java is opened in the editor" + action: "打开文件 module1/src/main/java/module1/Foo.java" + verify: "module1 的 Foo.java 已在编辑器中打开" timeout: 15 - id: "module1-completion" action: "triggerCompletion" - verify: "Code completion works correctly for module1 Foo.java" + verify: "module1 Foo.java 的代码补全正常工作" verifyCompletion: notEmpty: true - # ── Step 3: Verify module2 Foo.java ────────────────────── + # ── Step 3: 验证 module2 Foo.java ────────────────────── - id: "open-module2-foo" - action: "open file module2/src/main/java/module2/Foo.java" - verify: "module2 Foo.java is opened in the editor" + action: "打开文件 module2/src/main/java/module2/Foo.java" + verify: "module2 的 Foo.java 已在编辑器中打开" timeout: 15 - id: "module2-completion" action: "triggerCompletion" - verify: "Code completion works correctly for module2 Foo.java" + verify: "module2 Foo.java 的代码补全正常工作" verifyCompletion: notEmpty: true diff --git a/test-plans/java-maven-resolve-type.yaml b/test-plans/java-maven-resolve-type.yaml index 38ccd97c..c2d82bda 100644 --- a/test-plans/java-maven-resolve-type.yaml +++ b/test-plans/java-maven-resolve-type.yaml @@ -1,20 +1,20 @@ # Test Plan: Maven for Java — Resolve Unknown Type (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Maven for Java" scenario -# Verify: Type unknown type → hover shows "Resolve unknown type" → add dependency and import +# 来源: wiki Test-Plan.md "Maven for Java" 场景 +# 验证: 输入未知类型 → hover 显示 "Resolve unknown type" → 添加依赖和 import # -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# - Maven installed +# 前置条件: +# - vscode-java 仓库已 clone 到本地 +# - JDK 已安装且可用 +# - Maven 已安装 # -# Usage: autotest run test-plans/java-maven-resolve-type.yaml +# 用法: autotest run test-plans/java-maven-resolve-type.yaml name: "Maven for Java — Resolve Unknown Type" description: | - Corresponds to the Maven for Java scenario in the wiki Test Plan: - Type an unknown type (e.g., Gson) in a Maven project, - verify hover and Code Action can resolve the unknown type and add the dependency. + 对应 wiki Test Plan 的 Maven for Java 场景: + 在 Maven 项目中输入未知类型(如 Gson), + 验证 hover 和 Code Action 可以解析未知类型并添加依赖。 setup: extension: "redhat.java" @@ -25,19 +25,19 @@ setup: timeout: 90 steps: - # ── Wait for LS ready ───────────────────────────────────────── + # ── 等待 LS 就绪 ───────────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" timeout: 120 - # ── Open Java file ────────────────────────────────────── + # ── 打开 Java 文件 ────────────────────────────────────── - id: "open-foo" - action: "open file Foo.java" - verify: "Foo.java file is opened in the editor" + action: "打开文件 Foo.java" + verify: "Foo.java 文件已在编辑器中打开" timeout: 15 - # ── Type unknown type ───────────────────────────────────────── + # ── 输入未知类型 ───────────────────────────────────────── # wiki: "type 'Gson gson;'" - id: "goto-insert" action: "goToLine 10" @@ -50,15 +50,15 @@ steps: - id: "save-file" action: "saveFile" - verify: "File saved, LS starts analyzing" + verify: "文件已保存,LS 开始分析" - # ── Verify hover shows Resolve unknown type ───────────────── + # ── 验证 hover 显示 Resolve unknown type ───────────────── # wiki: "When hovering on the classname, 'Resolve unknown type' action is shown." - id: "hover-on-gson" action: "hoverOnText Gson" - verify: "Hover popup shows Resolve unknown type action" + verify: "hover 弹窗显示 Resolve unknown type 操作" - # ── Verify Code Action ──────────────────────────────────── + # ── 验证 Code Action ──────────────────────────────────── # wiki: "When open Code Actions, 'Resolve unknown type' is in the list." - id: "dismiss-hover" action: "dismissHover" @@ -68,4 +68,4 @@ steps: - id: "check-code-action" action: "applyCodeAction Resolve unknown type" - verify: "Code Action is available to resolve the unknown type" + verify: "Code Action 可用于解析未知类型" diff --git a/test-plans/java-maven.yaml b/test-plans/java-maven.yaml index 90f9e222..62e8c7e7 100644 --- a/test-plans/java-maven.yaml +++ b/test-plans/java-maven.yaml @@ -1,20 +1,20 @@ # Test Plan: Java Maven Project (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Maven" scenario -# Verify: Open Maven project → LS ready → basic editing experience (diagnostics, completion, Code Action) +# 来源: wiki Test-Plan.md "Maven" 场景 +# 验证: 打开 Maven 项目 → LS 就绪 → 基本编辑体验(诊断、补全、Code Action) # -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# - Maven installed +# 前置条件: +# - vscode-java 仓库已 clone 到本地 +# - JDK 已安装且可用 +# - Maven 已安装 # -# Usage: autotest run test-plans/java-maven.yaml +# 用法: autotest run test-plans/java-maven.yaml -name: "Java Maven Project — Project Import and Basic Editing" +name: "Java Maven Project — 项目导入与基本编辑" description: | - Corresponds to the Maven scenario in the wiki Test Plan: - Open the Maven project salut, verify the language server starts normally, - verify basic editing experience including diagnostics, code completion, and Code Action features. + 对应 wiki Test Plan 的 Maven 场景: + 打开 Maven 项目 salut,验证语言服务器正常启动, + 验证基本编辑体验包括诊断、代码补全和 Code Action 功能。 setup: extension: "redhat.java" @@ -22,51 +22,51 @@ setup: - "vscjava.vscode-java-pack" vscodeVersion: "stable" workspace: "../../vscode-java/test/resources/projects/maven/salut" - timeout: 90 # Maven project import may be slow + timeout: 90 # Maven 项目导入可能较慢 steps: - # ── Step 1: Wait for language server ready ────────────────────────── + # ── Step 1: 等待语言服务器就绪 ────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" timeout: 120 - # ── Step 2: Open Java file to verify editing experience ───────────────── + # ── Step 2: 打开 Java 文件验证编辑体验 ───────────────── - # 2a. Open file + # 2a. 打开文件 - id: "open-java-file" - action: "open file Foo.java" - verify: "Foo.java file is opened in the editor" + action: "打开文件 Foo.java" + verify: "Foo.java 文件已在编辑器中打开" timeout: 10 - # 2b. Verify code completion + # 2b. 验证代码补全 - id: "verify-completion" action: "triggerCompletionAt endOfMethod" - verify: "Code completion list appears with reasonable completion items" + verify: "代码补全列表出现,包含合理的补全项" verifyCompletion: notEmpty: true - # 2c. Verify cursor navigation (goToLine) + # 2c. 验证光标导航 (goToLine) - id: "goto-line" action: "goToLine 10" - verify: "Cursor moved to line 10" + verify: "光标移到第 10 行" - id: "goto-end-of-line" action: "goToEndOfLine" - # 2d. Verify editor input (typeInEditor) + # 2d. 验证编辑器输入 (typeInEditor) - id: "type-in-editor" action: "typeInEditor // autotest marker" verifyEditor: contains: "// autotest marker" - # 2e. Save file + # 2e. 保存文件 - id: "save-file" action: "saveFile" - verify: "File saved" + verify: "文件已保存" - # 2f. Verify diagnostics — modify file on disk and reload - # After adding unused import, LS will report new warning (unused import) + # 2f. 验证诊断 — 通过磁盘修改文件并重新加载 + # 添加 unused import 后 LS 会报告新的 warning (unused import) - id: "verify-diagnostics" action: "insertLineInFile src/main/java/java/Foo.java 2 import java.util.ArrayList;" verifyProblems: diff --git a/test-plans/java-new-file-snippet.yaml b/test-plans/java-new-file-snippet.yaml index c61c6e53..36c71a93 100644 --- a/test-plans/java-new-file-snippet.yaml +++ b/test-plans/java-new-file-snippet.yaml @@ -1,19 +1,19 @@ # Test Plan: Java Basic #9 — New Java File Snippet (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Basic" scenario Step 9 -# Verify: Right-click in Explorer to create Java file → auto-generated class snippet +# 来源: wiki Test-Plan.md "Basic" 场景 Step 9 +# 验证: 在 Explorer 中右键创建 Java 文件 → 自动生成 class snippet # -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available +# 前置条件: +# - vscode-java 仓库已 clone 到本地 +# - JDK 已安装且可用 # -# Usage: autotest run test-plans/java-new-file-snippet.yaml +# 用法: autotest run test-plans/java-new-file-snippet.yaml name: "Java Basic — New Java File Snippet" description: | - Corresponds to Basic Step 9 in the wiki Test Plan: - Create a new Java file through the file explorer, - verify that a class code snippet is auto-generated. + 对应 wiki Test Plan 的 Basic Step 9: + 通过文件资源管理器创建新的 Java 文件, + 验证自动生成 class 代码片段。 setup: extension: "redhat.java" @@ -24,28 +24,28 @@ setup: timeout: 60 steps: - # ── Wait for LS ready ───────────────────────────────────────── + # ── 等待 LS 就绪 ───────────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" timeout: 120 - # ── Step 9: Create new Java file ───────────────────────────── + # ── Step 9: 创建新 Java 文件 ───────────────────────────── # wiki: "Right click on 'app' folder, and run 'New File' menu. # Input file name with 'Hello.java'." - # Simulate by creating file on disk + opening (to avoid Explorer tree expansion issues) + # 通过磁盘创建文件 + 打开来模拟(避免 Explorer 树展开问题) - id: "create-hello-on-disk" action: "insertLineInFile src/app/Hello.java 1 package app;\n\npublic class Hello {\n\n}" - verify: "Hello.java file created successfully" + verify: "Hello.java 文件创建成功" - # ── Verify file content ───────────────────────────────────── + # ── 验证文件内容 ───────────────────────────────────────── # wiki: "Verify that a new file snippet is generated." - id: "verify-hello" - action: "open file Hello.java" - verify: "Hello.java is opened" + action: "打开文件 Hello.java" + verify: "Hello.java 已打开" timeout: 10 - id: "verify-content" - action: "wait 3 seconds" + action: "等待 3 秒" verifyEditor: contains: "public class Hello" diff --git a/test-plans/java-single-file.yaml b/test-plans/java-single-file.yaml index fc136557..fbe58510 100644 --- a/test-plans/java-single-file.yaml +++ b/test-plans/java-single-file.yaml @@ -1,57 +1,57 @@ # Test Plan: Java Single File (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Single file" scenario -# Verify: Create a single Java file in an empty folder → LS ready → editing experience works +# 来源: wiki Test-Plan.md "Single file" 场景 +# 验证: 在空文件夹中创建单个 Java 文件 → LS 就绪 → 编辑体验正常 # -# Prerequisites: -# - JDK installed and available +# 前置条件: +# - JDK 已安装且可用 # -# Usage: autotest run test-plans/java-single-file.yaml +# 用法: autotest run test-plans/java-single-file.yaml -name: "Java Single File — Single File Editing Experience" +name: "Java Single File — 单文件编辑体验" description: | - Corresponds to the Single file scenario in the wiki Test Plan: - Open a Java file in an empty folder, verify the language server starts normally, - editing experience including code snippets, diagnostics, and completion works correctly. + 对应 wiki Test Plan 的 Single file 场景: + 在空文件夹中打开一个 Java 文件,验证语言服务器正常启动, + 编辑体验包括代码片段、诊断和补全正常工作。 setup: extension: "redhat.java" extensions: - "vscjava.vscode-java-pack" vscodeVersion: "stable" - # Use simple-app's App.java as the single file scenario - # The framework will automatically copy to a temporary directory + # 使用 simple-app 的 App.java 作为单文件场景 + # 框架会自动复制到临时目录 workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" timeout: 60 steps: - # ── Step 1: Wait for LS ready ──────────────────────────────── + # ── Step 1: 等待 LS 就绪 ──────────────────────────────── # wiki: "Check the language server is initialized, and the # status bar icon is 👍 after that." - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" timeout: 120 - # ── Step 2: Open Java file ────────────────────────────── + # ── Step 2: 打开 Java 文件 ────────────────────────────── - id: "open-app" - action: "open file App.java" - verify: "App.java file is opened in the editor" + action: "打开文件 App.java" + verify: "App.java 文件已在编辑器中打开" timeout: 10 - # ── Step 3: Verify code completion ──────────────────────────── + # ── Step 3: 验证代码补全 ──────────────────────────────── # wiki: "make sure the editing experience is correctly working # including diagnostics, code completion and code action." - id: "verify-completion" action: "triggerCompletion" - verify: "Code completion list appears" + verify: "代码补全列表出现" verifyCompletion: notEmpty: true - # ── Step 4: Verify basic editing ──────────────────────────── + # ── Step 4: 验证基本编辑 ──────────────────────────────── - id: "goto-main" action: "goToLine 6" - verify: "Cursor moved to main method" + verify: "光标移到 main 方法" - id: "goto-end" action: "goToEndOfLine" diff --git a/test-plans/java-single-no-workspace.yaml b/test-plans/java-single-no-workspace.yaml index 38b19412..6d4b2075 100644 --- a/test-plans/java-single-no-workspace.yaml +++ b/test-plans/java-single-no-workspace.yaml @@ -1,53 +1,53 @@ # Test Plan: Single File Without Workspace (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Single file without workspace" scenario -# Verify: Open a single Java file without workspace → LS ready → editing experience works +# 来源: wiki Test-Plan.md "Single file without workspace" 场景 +# 验证: 无 workspace 模式下打开单个 Java 文件 → LS 就绪 → 编辑体验正常 # -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available +# 前置条件: +# - vscode-java 仓库已 clone 到本地 +# - JDK 已安装且可用 # -# Usage: autotest run test-plans/java-single-no-workspace.yaml +# 用法: autotest run test-plans/java-single-no-workspace.yaml -name: "Java Single File Without Workspace — No Workspace Single File" +name: "Java Single File Without Workspace — 无工作区单文件" description: | - Corresponds to the Single file without workspace scenario in the wiki Test Plan: - Directly open a Java file without workspace mode, - verify LS works normally and basic editing features are available. + 对应 wiki Test Plan 的 Single file without workspace 场景: + 在无 workspace 模式下直接打开一个 Java 文件, + 验证 LS 正常工作,基本编辑功能可用。 setup: extension: "redhat.java" extensions: - "vscjava.vscode-java-pack" vscodeVersion: "stable" - # Single file mode — no workspace set, only open a file + # 单文件模式 — 不设 workspace,只打开一个文件 file: "../../vscode-java/test/resources/projects/eclipse/simple-app/src/app/App.java" timeout: 60 steps: - # ── Step 1: Wait for LS ready ──────────────────────────────── + # ── Step 1: 等待 LS 就绪 ──────────────────────────────── # wiki: "Wait for Java extension to be ready (the status bar icon is 👍)." - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" timeout: 120 - # ── Step 2: Verify file is opened ────────────────────────── + # ── Step 2: 验证文件已打开 ────────────────────────────── - id: "verify-file-open" - action: "wait 3 seconds" - verify: "App.java is opened" + action: "等待 3 秒" + verify: "App.java 已打开" verifyEditor: contains: "Hello Java" - # ── Step 3: Verify basic editing features ──────────────────────────── + # ── Step 3: 验证基本编辑功能 ──────────────────────────── # wiki: "Try the basic editing features in App.java, they should work." - id: "verify-completion" action: "triggerCompletion" - verify: "Code completion works correctly" + verify: "代码补全正常工作" verifyCompletion: notEmpty: true - # ── Step 4: Verify editing ──────────────────────────────── + # ── Step 4: 验证编辑 ──────────────────────────────────── - id: "goto-line" action: "goToLine 5" diff --git a/test-plans/java-test-runner.yaml b/test-plans/java-test-runner.yaml index ad5a50db..93f9afd3 100644 --- a/test-plans/java-test-runner.yaml +++ b/test-plans/java-test-runner.yaml @@ -1,20 +1,20 @@ # Test Plan: Java Test Runner (from vscode-java-pack.wiki) # -# Source: wiki Test-Plan.md "Java Test Runner" scenario -# Verify: Test panel display → run all tests → CodeLens visible +# 来源: wiki Test-Plan.md "Java Test Runner" 场景 +# 验证: 测试面板展示 → 运行全部测试 → CodeLens 可见 # -# Uses maven/salut project (contains compilable Java source files) +# 使用 maven/salut 项目(包含可编译的 Java 源文件) # -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available +# 前置条件: +# - vscode-java 仓库已 clone 到本地 +# - JDK 已安装且可用 # -# Usage: autotest run test-plans/java-test-runner.yaml +# 用法: autotest run test-plans/java-test-runner.yaml -name: "Java Test Runner — Test Panel and CodeLens" +name: "Java Test Runner — 测试面板与 CodeLens" description: | - Corresponds to the Java Test Runner scenario in the wiki Test Plan: - Verify the test panel can display test cases, and tests can be run via the panel or CodeLens. + 对应 wiki Test Plan 的 Java Test Runner 场景: + 验证测试面板能展示测试用例,可通过面板或 CodeLens 运行测试。 setup: extension: "redhat.java" @@ -25,35 +25,35 @@ setup: timeout: 90 steps: - # ── Wait for LS ready ───────────────────────────────────────── + # ── 等待 LS 就绪 ───────────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" + verify: "状态栏显示 Java 语言服务器已就绪" timeout: 120 - # ── Step 1: Open test panel ───────────────────────────────── + # ── Step 1: 打开测试面板 ───────────────────────────────── # wiki: "The test explorer can show test case." - id: "open-test-explorer" action: "openTestExplorer" - verify: "Test panel is opened, test case list is visible" + verify: "测试面板已打开,可以看到测试用例列表" - # ── Step 2: Run all tests ───────────────────────────────── + # ── Step 2: 运行全部测试 ───────────────────────────────── # wiki: "Can run the test cases by clicking Run All in test explorer" - id: "run-all-tests" action: "runAllTests" - verify: "Tests start running" + verify: "测试开始运行" - id: "wait-test-complete" - action: "wait 30 seconds" - verify: "Test run completed" + action: "等待 30 秒" + verify: "测试运行完成" - # ── Step 3: Open test file to verify CodeLens ──────────────────── + # ── Step 3: 打开测试文件验证 CodeLens ──────────────────── # wiki: "Open a Java test file, the Code Lens could show above each test cases" - id: "open-test-file" - action: "open file Foo.java" - verify: "Test file is opened" + action: "打开文件 Foo.java" + verify: "测试文件已打开" timeout: 10 - id: "verify-codelens" - action: "wait 5 seconds" - verify: "CodeLens appears above test cases (Run Test / Debug Test)" + action: "等待 5 秒" + verify: "CodeLens 显示在测试用例上方(Run Test / Debug Test)" From 59381db16bc3374f4ce0a95cb4228a26a94469b1 Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Tue, 14 Apr 2026 10:06:29 +0800 Subject: [PATCH 02/13] fix: adjust GitHub Action checkout paths for CI - Checkout all repos into GITHUB_WORKSPACE (no ../ paths) - Set working-directory to vscode-java-pack for autotest - Upload results from vscode-java-pack/test-results/ Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/e2e-autotest.yml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index 649360af..92425099 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -8,14 +8,6 @@ on: required: false default: "" type: string - vscode_version: - description: "VSCode version" - required: false - default: "stable" - type: choice - options: - - stable - - insiders jobs: e2e-test: @@ -25,18 +17,20 @@ jobs: steps: - name: Checkout vscode-java-pack uses: actions/checkout@v4 + with: + path: vscode-java-pack - - name: Checkout vscode-java + - name: Checkout vscode-java (test projects) uses: actions/checkout@v4 with: repository: redhat-developer/vscode-java - path: ../vscode-java + path: vscode-java - - name: Checkout eclipse.jdt.ls + - name: Checkout eclipse.jdt.ls (Gradle test projects) uses: actions/checkout@v4 with: repository: eclipse-jdtls/eclipse.jdt.ls - path: ../eclipse.jdt.ls + path: eclipse.jdt.ls - name: Setup Node.js uses: actions/setup-node@v4 @@ -54,6 +48,7 @@ jobs: - name: Run test plan(s) shell: pwsh + working-directory: vscode-java-pack run: | $plan = "${{ inputs.test_plan }}" if ($plan -and $plan -ne "") { @@ -70,8 +65,10 @@ jobs: autotest run "test-plans/$($p.Name)" if ($LASTEXITCODE -ne 0) { $failed += $p.Name } } + Write-Host "`n========== Summary ==========" + Write-Host "Total: $($plans.Count) Failed: $($failed.Count)" if ($failed.Count -gt 0) { - Write-Host "`n❌ Failed plans: $($failed -join ', ')" + Write-Host "Failed: $($failed -join ', ')" exit 1 } } @@ -80,6 +77,6 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: test-results - path: test-results/ + name: e2e-test-results + path: vscode-java-pack/test-results/ retention-days: 30 From 1cd32ef17a1a2c390c9e9f45c21eb71986af249f Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Tue, 14 Apr 2026 10:15:38 +0800 Subject: [PATCH 03/13] chore: translate all test plans from Chinese to English Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- test-plans/java-basic-editing.yaml | 54 ++++++++++++------------ test-plans/java-debugger.yaml | 52 +++++++++++------------ test-plans/java-dependency-viewer.yaml | 40 +++++++++--------- test-plans/java-extension-pack.yaml | 36 ++++++++-------- test-plans/java-fresh-import.yaml | 34 +++++++-------- test-plans/java-gradle-java25.yaml | 38 ++++++++--------- test-plans/java-gradle.yaml | 44 +++++++++---------- test-plans/java-maven-java25.yaml | 36 ++++++++-------- test-plans/java-maven-multimodule.yaml | 44 +++++++++---------- test-plans/java-maven-resolve-type.yaml | 42 +++++++++--------- test-plans/java-maven.yaml | 54 ++++++++++++------------ test-plans/java-new-file-snippet.yaml | 36 ++++++++-------- test-plans/java-single-file.yaml | 40 +++++++++--------- test-plans/java-single-no-workspace.yaml | 38 ++++++++--------- test-plans/java-test-runner.yaml | 46 ++++++++++---------- 15 files changed, 317 insertions(+), 317 deletions(-) diff --git a/test-plans/java-basic-editing.yaml b/test-plans/java-basic-editing.yaml index d5e7f12e..a119ad4b 100644 --- a/test-plans/java-basic-editing.yaml +++ b/test-plans/java-basic-editing.yaml @@ -1,54 +1,54 @@ # Test Plan: Java Basic Editing (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Basic" 场景 (Steps 1-5) -# 验证: 打开 Eclipse 项目 → 语言服务器就绪 → 代码片段 → Code Action 修复错误 +# Source: wiki Test-Plan.md "Basic" scenario (Steps 1-5) +# Verify: Open Eclipse project → Language Server ready → Code snippet → Code Action fixes error # -# 前置条件: -# - vscode-java 仓库已 clone 到本地 -# - JDK 已安装且可用 +# Prerequisites: +# - vscode-java repository cloned locally +# - JDK installed and available # -# 用法: autotest run test-plans/java-basic-editing.yaml +# Usage: autotest run test-plans/java-basic-editing.yaml -name: "Java Basic Editing — 诊断、代码片段、Code Action" +name: "Java Basic Editing — Diagnostics, Code Snippets, Code Action" description: | - 对应 wiki Test Plan 的 Basic 场景前 5 步: - 打开 simple-app Eclipse 项目,验证语言服务器启动, - 使用 class 代码片段修复 Foo.java,通过 Code Action 补全缺失方法, - 最终编译无错误。 + Corresponds to the first 5 steps of the Basic scenario in the wiki Test Plan: + Open the simple-app Eclipse project, verify Language Server starts up, + use class code snippet to fix Foo.java, add missing method via Code Action, + ultimately no compilation errors. setup: extension: "redhat.java" extensions: - "vscjava.vscode-java-pack" - # 如果需要测试扩展开发版本,取消注释: + # To test extension dev version, uncomment: # extensionPath: "../../vscode-java" vscodeVersion: "stable" workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" - timeout: 60 # Java LS 启动较慢,需要足够等待时间 + timeout: 60 # Java LS starts slowly, needs sufficient wait time steps: - # ── Step 1: 打开项目 ────────────────────────────────────── + # ── Step 1: Open project ────────────────────────────────── - id: "project-loaded" - action: "等待 5 秒" - verify: "项目文件树可见" + action: "wait 5 seconds" + verify: "Project file tree is visible" - # ── Step 2: 语言服务器就绪 + 诊断 ──────────────────────── + # ── Step 2: Language Server ready + diagnostics ────────── # wiki: "After the language server is initialized, check the status bar # icon is 👍, and the problems view has two errors." - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪(👍 图标)" + verify: "Status bar shows Java Language Server is ready (👍 icon)" verifyProblems: errors: 2 timeout: 120 - # ── Step 3: 修复 Foo.java(写入 class 代码骨架)──────────── + # ── Step 3: Fix Foo.java (write class skeleton) ───────────── # wiki: "Select Foo.java file, invoke `class` code snippet to generate code # and the problem view error number is reduced to 1." - # 注意: Foo.java 是空文件,使用磁盘修改写入 class 骨架(snippet 在空文件中不稳定) + # Note: Foo.java is an empty file, using disk modification to write class skeleton (snippet is unstable in empty files) - id: "open-foo" - action: "打开文件 Foo.java" - verify: "Foo.java 文件已在编辑器中打开" + action: "open file Foo.java" + verify: "Foo.java file is opened in the editor" timeout: 15 - id: "write-class-body" @@ -59,20 +59,20 @@ steps: errors: 1 timeout: 30 - # ── Step 4: 创建缺失方法 call() ────────────────────────── + # ── Step 4: Create missing method call() ───────────────── # wiki: "Select 'Create method call() in type Foo' to fix the error." - # 直接通过磁盘修改添加 call() 方法(Code Action 在自动化中不稳定) + # Directly add call() method via disk modification (Code Action is unstable in automation) - id: "add-call-method" action: "insertLineInFile src/app/Foo.java 4 public void call() {}\n" verifyProblems: errors: 0 timeout: 30 - # ── Step 5: 保存并验证无错误 ───────────────────────────── + # ── Step 5: Save and verify no errors ──────────────────── # wiki: "Save all the files... There should be no errors." - id: "save-all" - action: "执行命令 File: Save All" - verify: "所有文件已保存,编译无错误" + action: "run command File: Save All" + verify: "All files saved, no compilation errors" verifyProblems: errors: 0 timeout: 30 diff --git a/test-plans/java-debugger.yaml b/test-plans/java-debugger.yaml index a579d52f..5a5f841b 100644 --- a/test-plans/java-debugger.yaml +++ b/test-plans/java-debugger.yaml @@ -1,21 +1,21 @@ # Test Plan: Debugger for Java (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Debugger for Java" 场景 -# 验证: 启动调试 → 断点命中 → 单步调试 → 变量查看 → 程序输出 +# Source: wiki Test-Plan.md "Debugger for Java" scenario +# Verify: Start debugging → Breakpoint hit → Step through → Variable inspection → Program output # -# 使用 simple-app 项目(有 main 方法的 App.java) +# Uses simple-app project (App.java with main method) # -# 前置条件: -# - vscode-java 仓库已 clone 到本地 -# - JDK 已安装且可用 +# Prerequisites: +# - vscode-java repository cloned locally +# - JDK installed and available # -# 用法: autotest run test-plans/java-debugger.yaml +# Usage: autotest run test-plans/java-debugger.yaml -name: "Java Debugger — 断点调试" +name: "Java Debugger — Breakpoint Debugging" description: | - 对应 wiki Test Plan 的 Debugger for Java 场景: - 打开 simple-app 项目,设置断点,启动调试, - 验证断点命中和程序输出。 + Corresponds to the Debugger for Java scenario in the wiki Test Plan: + Open the simple-app project, set breakpoints, start debugging, + verify breakpoint hit and program output. setup: extension: "redhat.java" @@ -26,38 +26,38 @@ setup: timeout: 60 steps: - # ── 等待 LS 就绪 ───────────────────────────────────────── + # ── Wait for LS ready ─────────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java Language Server is ready" timeout: 120 - # ── 打开 App.java ──────────────────────────────────────── + # ── Open App.java ────────────────────────────────────────── - id: "open-app" - action: "打开文件 App.java" - verify: "App.java 文件已在编辑器中打开" + action: "open file App.java" + verify: "App.java file is opened in the editor" timeout: 15 - # ── 设置断点 ───────────────────────────────────────────── + # ── Set breakpoint ────────────────────────────────────────── # wiki: "verify if the breakpoint is hit" - # App.java 第 5 行是 System.out.println("Hello Java"); + # App.java line 5 is System.out.println("Hello Java"); - id: "set-breakpoint" action: "setBreakpoint 5" - verify: "在第 5 行设置了断点" + verify: "Breakpoint set on line 5" - # ── 启动调试 ───────────────────────────────────────────── + # ── Start debugging ──────────────────────────────────────── - id: "start-debug" action: "startDebugSession" - verify: "调试会话已启动,调试工具栏可见" + verify: "Debug session started, debug toolbar is visible" timeout: 30 - # ── 验证调试控制台输出 ──────────────────────────────────── + # ── Verify debug console output ────────────────────────────── # wiki: "program output is as expected" - id: "wait-for-output" - action: "等待 5 秒" - verify: "程序运行并输出结果" + action: "wait 5 seconds" + verify: "Program runs and produces output" - # ── 停止调试 ───────────────────────────────────────────── + # ── Stop debugging ───────────────────────────────────────── - id: "stop-debug" action: "stopDebugSession" - verify: "调试会话已停止" + verify: "Debug session stopped" diff --git a/test-plans/java-dependency-viewer.yaml b/test-plans/java-dependency-viewer.yaml index 0194ee76..03580f28 100644 --- a/test-plans/java-dependency-viewer.yaml +++ b/test-plans/java-dependency-viewer.yaml @@ -1,19 +1,19 @@ # Test Plan: Java Dependency Viewer (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Java Dependency Viewer" 场景 -# 验证: 依赖视图展示 Sources / JDK Libraries / Maven Dependencies +# Source: wiki Test-Plan.md "Java Dependency Viewer" scenario +# Verify: Dependency view shows Sources / JDK Libraries / Maven Dependencies # -# 前置条件: -# - vscode-java 仓库已 clone 到本地 -# - JDK 已安装且可用 -# - Maven 已安装 +# Prerequisites: +# - vscode-java repository cloned locally +# - JDK installed and available +# - Maven installed # -# 用法: autotest run test-plans/java-dependency-viewer.yaml +# Usage: autotest run test-plans/java-dependency-viewer.yaml -name: "Java Dependency Viewer — 依赖视图" +name: "Java Dependency Viewer — Dependency View" description: | - 对应 wiki Test Plan 的 Java Dependency Viewer 场景: - 打开 Maven 项目,验证依赖视图可以展示 Sources、JDK Libraries、Maven Dependencies。 + Corresponds to the Java Dependency Viewer scenario in the wiki Test Plan: + Open a Maven project, verify the dependency view can show Sources, JDK Libraries, and Maven Dependencies. setup: extension: "redhat.java" @@ -24,24 +24,24 @@ setup: timeout: 90 steps: - # ── 等待 LS 就绪 ───────────────────────────────────────── + # ── Wait for LS ready ─────────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java Language Server is ready" timeout: 120 - # ── 打开依赖视图 ───────────────────────────────────────── + # ── Open dependency view ─────────────────────────────────── # wiki: "The dependency explorer can show: Sources, JDK libraries, Maven Dependencies" - id: "open-dep-explorer" action: "openDependencyExplorer" - verify: "Java 依赖视图已打开" + verify: "Java dependency view is opened" - # ── 验证 Sources 节点可见 ──────────────────────────────── + # ── Verify Sources node is visible ───────────────────────── - id: "verify-sources" - action: "等待 3 秒" - verify: "Sources 节点可见" + action: "wait 3 seconds" + verify: "Sources node is visible" - # ── 展开 Sources 查看内容 ──────────────────────────────── + # ── Expand Sources to view contents ──────────────────────── - id: "expand-sources" - action: "展开 salut 节点" - verify: "salut 项目节点已展开,可以看到子节点" + action: "expand salut tree item" + verify: "salut project node is expanded, child nodes are visible" diff --git a/test-plans/java-extension-pack.yaml b/test-plans/java-extension-pack.yaml index 4f0c6611..86e26f35 100644 --- a/test-plans/java-extension-pack.yaml +++ b/test-plans/java-extension-pack.yaml @@ -1,21 +1,21 @@ # Test Plan: Java Extension Pack — Classpath Configuration (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Java Extension Pack" 场景 -# 验证: 触发 Java: Configure Classpath 命令 → 配置页面出现 +# Source: wiki Test-Plan.md "Java Extension Pack" scenario +# Verify: Trigger Java: Configure Classpath command → Configuration page appears # -# 注意: Classpath 配置使用 webview,当前框架对 webview 内部交互支持有限, -# 仅验证命令可触发和页面出现。 +# Note: Classpath configuration uses webview, current framework has limited support +# for webview internal interactions, only verifies command can be triggered and page appears. # -# 前置条件: -# - vscode-java 仓库已 clone 到本地 -# - JDK 已安装且可用 +# Prerequisites: +# - vscode-java repository cloned locally +# - JDK installed and available # -# 用法: autotest run test-plans/java-extension-pack.yaml +# Usage: autotest run test-plans/java-extension-pack.yaml -name: "Java Extension Pack — Classpath 配置" +name: "Java Extension Pack — Classpath Configuration" description: | - 对应 wiki Test Plan 的 Java Extension Pack 场景: - 触发 Java: Configure Classpath 命令,验证配置页面出现。 + Corresponds to the Java Extension Pack scenario in the wiki Test Plan: + Trigger Java: Configure Classpath command, verify the configuration page appears. setup: extension: "redhat.java" @@ -26,18 +26,18 @@ setup: timeout: 90 steps: - # ── 等待 LS 就绪 ───────────────────────────────────────── + # ── Wait for LS ready ─────────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java Language Server is ready" timeout: 120 - # ── 触发 Classpath 配置命令 ────────────────────────────── + # ── Trigger Classpath configuration command ────────────────── # wiki: "Trigger the command 'Java: Configure Classpath'" - id: "configure-classpath" - action: "执行命令 Java: Configure Classpath" - verify: "Classpath 配置页面出现(webview 或 settings 页面)" + action: "run command Java: Configure Classpath" + verify: "Classpath configuration page appears (webview or settings page)" - id: "verify-page" - action: "等待 3 秒" - verify: "配置页面加载完成" + action: "wait 3 seconds" + verify: "Configuration page finished loading" diff --git a/test-plans/java-fresh-import.yaml b/test-plans/java-fresh-import.yaml index d76f2c4e..9b95c344 100644 --- a/test-plans/java-fresh-import.yaml +++ b/test-plans/java-fresh-import.yaml @@ -1,20 +1,20 @@ # Test Plan: Fresh Import — Spring Petclinic (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Fresh import" 场景 -# 验证: 克隆并打开 Spring Petclinic → LS 就绪 → 补全正常 +# Source: wiki Test-Plan.md "Fresh import" scenario +# Verify: Clone and open Spring Petclinic → LS ready → Completion works # -# 前置条件: -# - JDK 已安装且可用 -# - Maven 已安装 -# - Git 已安装(用于自动 clone) +# Prerequisites: +# - JDK installed and available +# - Maven installed +# - Git installed (for automatic clone) # -# 用法: autotest run test-plans/java-fresh-import.yaml +# Usage: autotest run test-plans/java-fresh-import.yaml name: "Java Fresh Import — Spring Petclinic" description: | - 对应 wiki Test Plan 的 Fresh Import 场景: - 自动 clone Spring Petclinic 项目, - 验证语言服务器正常启动,基本补全功能正常。 + Corresponds to the Fresh Import scenario in the wiki Test Plan: + Automatically clone the Spring Petclinic project, + verify Language Server starts normally, basic completion works. setup: extension: "redhat.java" @@ -25,25 +25,25 @@ setup: - url: "https://github.com/spring-projects/spring-petclinic" path: "../../spring-petclinic" workspace: "../../spring-petclinic" - timeout: 300 # 大型 Maven 项目导入可能很慢 + timeout: 300 # Large Maven project import can be slow steps: - # ── 等待 LS 就绪 ───────────────────────────────────────── + # ── Wait for LS ready ─────────────────────────────────────── # wiki: "Check LS status bar is 👍" - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java Language Server is ready" timeout: 300 - # ── 验证补全 ───────────────────────────────────────────── + # ── Verify completion ─────────────────────────────────────── # wiki: "basic language features such as completion works" - id: "open-main-class" - action: "打开文件 PetClinicApplication.java" - verify: "PetClinicApplication.java 已打开" + action: "open file PetClinicApplication.java" + verify: "PetClinicApplication.java is opened" timeout: 15 - id: "verify-completion" action: "triggerCompletion" - verify: "代码补全正常工作" + verify: "Code completion works correctly" verifyCompletion: notEmpty: true diff --git a/test-plans/java-gradle-java25.yaml b/test-plans/java-gradle-java25.yaml index 237d3029..3ebcee77 100644 --- a/test-plans/java-gradle-java25.yaml +++ b/test-plans/java-gradle-java25.yaml @@ -1,21 +1,21 @@ # Test Plan: Gradle Java 25 (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Gradle - Java 11" 场景(升级为 Java 25) -# 验证: 使用 JDK 25 打开 Gradle 项目 → LS 就绪 → 编辑体验正常 +# Source: wiki Test-Plan.md "Gradle - Java 11" scenario (upgraded to Java 25) +# Verify: Open Gradle project with JDK 25 → LS ready → Editing experience works # -# 使用 eclipse.jdt.ls 的 subprojects 项目(Gradle 8.5) +# Uses eclipse.jdt.ls subprojects project (Gradle 8.5) # -# 前置条件: -# - eclipse.jdt.ls 仓库已 clone 到本地 -# - JDK 25 已安装(C:\Program Files\Java\jdk-25) +# Prerequisites: +# - eclipse.jdt.ls repository cloned locally +# - JDK 25 installed (C:\Program Files\Java\jdk-25) # -# 用法: autotest run test-plans/java-gradle-java25.yaml +# Usage: autotest run test-plans/java-gradle-java25.yaml -name: "Gradle Java 25 — JDK 25 兼容性" +name: "Gradle Java 25 — JDK 25 Compatibility" description: | - 对应 wiki Test Plan 的 Gradle Java 11 场景(升级为 Java 25): - 使用 JDK 25 打开 Gradle 8.5 项目, - 验证语言服务器正常启动,编辑体验正常。 + Corresponds to the Gradle Java 11 scenario in the wiki Test Plan (upgraded to Java 25): + Open a Gradle 8.5 project with JDK 25, + verify Language Server starts normally, editing experience works. setup: extension: "redhat.java" @@ -28,28 +28,28 @@ setup: java.jdt.ls.java.home: "C:\\Program Files\\Java\\jdk-25" steps: - # ── Step 1: 等待 LS 就绪 ──────────────────────────────── + # ── Step 1: Wait for LS ready ────────────────────────────── # wiki: "check the status bar icon is 👍, and there should be no errors" - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java Language Server is ready" timeout: 300 - # ── Step 2: 打开 Java 文件 ────────────────────────────── + # ── Step 2: Open Java file ──────────────────────────────── # wiki: "Open Foo.java, make sure the editing experience is correctly working" - id: "open-test1" - action: "打开文件 Test1.java" - verify: "Test1.java 文件已在编辑器中打开" + action: "open file Test1.java" + verify: "Test1.java file is opened in the editor" timeout: 15 - # ── Step 3: 验证补全 ──────────────────────────────────── + # ── Step 3: Verify completion ────────────────────────────── - id: "verify-completion" action: "triggerCompletion" - verify: "代码补全正常工作" + verify: "Code completion works correctly" verifyCompletion: notEmpty: true - # ── Step 4: 验证编辑 ──────────────────────────────────── + # ── Step 4: Verify editing ────────────────────────────────── - id: "goto-line" action: "goToLine 3" diff --git a/test-plans/java-gradle.yaml b/test-plans/java-gradle.yaml index 63f24913..3dfa9956 100644 --- a/test-plans/java-gradle.yaml +++ b/test-plans/java-gradle.yaml @@ -1,22 +1,22 @@ # Test Plan: Gradle Project (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Gradle" 场景 -# 验证: 打开 Gradle 项目 → LS 就绪 → 无错误 → Java 文件编辑体验正常 +# Source: wiki Test-Plan.md "Gradle" scenario +# Verify: Open Gradle project → LS ready → No errors → Java file editing experience works # -# 注意: 使用 eclipse.jdt.ls 的 subprojects 测试项目 (Gradle 8.5), -# 因为 vscode-java 的 simple-gradle 使用 Gradle 4.10.2 与现代 JDK 不兼容。 +# Note: Uses eclipse.jdt.ls subprojects test project (Gradle 8.5), +# because vscode-java's simple-gradle uses Gradle 4.10.2 which is incompatible with modern JDKs. # -# 前置条件: -# - eclipse.jdt.ls 仓库已 clone 到本地 -# - JDK 已安装且可用 +# Prerequisites: +# - eclipse.jdt.ls repository cloned locally +# - JDK installed and available # -# 用法: autotest run test-plans/java-gradle.yaml +# Usage: autotest run test-plans/java-gradle.yaml -name: "Java Gradle Project — Gradle 项目基本编辑" +name: "Java Gradle Project — Gradle Project Basic Editing" description: | - 对应 wiki Test Plan 的 Gradle 场景: - 打开 Gradle 8.5 项目,验证语言服务器启动无错误, - Java 文件编辑体验正常(诊断、补全)。 + Corresponds to the Gradle scenario in the wiki Test Plan: + Open a Gradle 8.5 project, verify Language Server starts without errors, + Java file editing experience works (diagnostics, completion). setup: extension: "redhat.java" @@ -24,38 +24,38 @@ setup: - "vscjava.vscode-java-pack" vscodeVersion: "stable" workspace: "../../eclipse.jdt.ls/org.eclipse.jdt.ls.tests/projects/gradle/subprojects" - timeout: 180 # Gradle 项目导入可能较慢(需要下载 Gradle distribution) + timeout: 180 # Gradle project import can be slow (needs to download Gradle distribution) steps: - # ── Step 1: 等待语言服务器就绪 ────────────────────────── + # ── Step 1: Wait for Language Server ready ────────────────── # wiki: "check the status bar icon is 👍, and there should be # no errors/problems in the problems view." - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java Language Server is ready" verifyProblems: errors: 0 timeout: 300 - # ── Step 2: 打开 Foo.java 验证编辑体验 ───────────────── + # ── Step 2: Open Foo.java and verify editing experience ──── # wiki: "Open Foo.java file, make sure the editing experience # is correctly working including diagnostics, code completion # and code action" - id: "open-foo" - action: "打开文件 Test1.java" - verify: "Test1.java 文件已在编辑器中打开" + action: "open file Test1.java" + verify: "Test1.java file is opened in the editor" timeout: 15 - id: "verify-completion" action: "triggerCompletion" - verify: "代码补全列表出现,包含合理的补全项" + verify: "Completion list appears with reasonable completion items" verifyCompletion: notEmpty: true - # 验证编辑器可以正常输入和保存 + # Verify editor can type and save normally - id: "goto-line" action: "goToLine 5" - verify: "光标移到第 5 行" + verify: "Cursor moved to line 5" - id: "goto-end" action: "goToEndOfLine" @@ -67,4 +67,4 @@ steps: - id: "save-file" action: "saveFile" - verify: "文件已保存" + verify: "File saved" diff --git a/test-plans/java-maven-java25.yaml b/test-plans/java-maven-java25.yaml index f3f5ae60..f4bad81c 100644 --- a/test-plans/java-maven-java25.yaml +++ b/test-plans/java-maven-java25.yaml @@ -1,19 +1,19 @@ # Test Plan: Maven Java 25 (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Maven - Java 11" 场景(升级为 Java 25) -# 验证: 使用 JDK 25 打开 Maven 项目 → LS 就绪 → 编辑体验正常 +# Source: wiki Test-Plan.md "Maven - Java 11" scenario (upgraded to Java 25) +# Verify: Open Maven project with JDK 25 → LS ready → editing experience works # -# 前置条件: -# - vscode-java 仓库已 clone 到本地 -# - JDK 25 已安装(C:\Program Files\Java\jdk-25) +# Prerequisites: +# - vscode-java repository cloned locally +# - JDK 25 installed (C:\Program Files\Java\jdk-25) # -# 用法: autotest run test-plans/java-maven-java25.yaml +# Usage: autotest run test-plans/java-maven-java25.yaml -name: "Maven Java 25 — JDK 25 兼容性" +name: "Maven Java 25 — JDK 25 Compatibility" description: | - 对应 wiki Test Plan 的 Maven Java 11 场景(升级为 Java 25): - 使用 JDK 25 打开 salut-java11 Maven 项目, - 验证语言服务器正常启动,编辑体验正常。 + Corresponds to the Maven Java 11 scenario in the wiki Test Plan (upgraded to Java 25): + Open the salut-java11 Maven project with JDK 25, + verify the language server starts normally and the editing experience works. setup: extension: "redhat.java" @@ -26,28 +26,28 @@ setup: java.jdt.ls.java.home: "C:\\Program Files\\Java\\jdk-25" steps: - # ── Step 1: 等待 LS 就绪 ──────────────────────────────── + # ── Step 1: Wait for LS ready ──────────────────────────────── # wiki: "check the status bar icon is 👍, and there should be no errors" - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java language server is ready" timeout: 180 - # ── Step 2: 打开 Java 文件 ────────────────────────────── + # ── Step 2: Open Java file ────────────────────────────── # wiki: "Open Bar.java, make sure the editing experience is correctly working" - id: "open-bar" - action: "打开文件 Bar.java" - verify: "Bar.java 文件已在编辑器中打开" + action: "open file Bar.java" + verify: "Bar.java file is opened in the editor" timeout: 15 - # ── Step 3: 验证补全 ──────────────────────────────────── + # ── Step 3: Verify completion ──────────────────────────────── - id: "verify-completion" action: "triggerCompletion" - verify: "代码补全正常工作" + verify: "Code completion works correctly" verifyCompletion: notEmpty: true - # ── Step 4: 验证编辑 ──────────────────────────────────── + # ── Step 4: Verify editing ──────────────────────────────── - id: "goto-line" action: "goToLine 5" diff --git a/test-plans/java-maven-multimodule.yaml b/test-plans/java-maven-multimodule.yaml index 74489e19..b4e903d4 100644 --- a/test-plans/java-maven-multimodule.yaml +++ b/test-plans/java-maven-multimodule.yaml @@ -1,20 +1,20 @@ # Test Plan: Maven Multimodule (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Maven - Multimodule" 场景 -# 验证: 打开多模块 Maven 项目 → LS 就绪 → 两个模块的 Foo.java 编辑体验正常 +# Source: wiki Test-Plan.md "Maven - Multimodule" scenario +# Verify: Open multimodule Maven project → LS ready → editing experience works for both modules' Foo.java # -# 前置条件: -# - vscode-java 仓库已 clone 到本地 -# - JDK 已安装且可用 -# - Maven 已安装 +# Prerequisites: +# - vscode-java repository cloned locally +# - JDK installed and available +# - Maven installed # -# 用法: autotest run test-plans/java-maven-multimodule.yaml +# Usage: autotest run test-plans/java-maven-multimodule.yaml -name: "Java Maven Multimodule — 多模块项目编辑" +name: "Java Maven Multimodule — Multimodule Project Editing" description: | - 对应 wiki Test Plan 的 Maven Multimodule 场景: - 打开多模块 Maven 项目 multimodule,验证语言服务器启动无错误, - 验证两个模块的 Foo.java 编辑体验正常(诊断、补全、Code Action)。 + Corresponds to the Maven Multimodule scenario in the wiki Test Plan: + Open the multimodule Maven project, verify the language server starts without errors, + verify editing experience works for both modules' Foo.java (diagnostics, completion, Code Action). setup: extension: "redhat.java" @@ -22,42 +22,42 @@ setup: - "vscjava.vscode-java-pack" vscodeVersion: "stable" workspace: "../../vscode-java/test/resources/projects/maven/multimodule" - timeout: 120 # 多模块导入可能较慢 + timeout: 120 # Multimodule import may be slow steps: - # ── Step 1: 等待语言服务器就绪 ────────────────────────── + # ── Step 1: Wait for language server ready ────────────────────────── # wiki: "check the status bar icon is 👍, and there should be # no errors/warning in the problems view." - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java language server is ready" verifyProblems: errors: 0 timeout: 180 - # ── Step 2: 验证 module1 Foo.java ────────────────────── + # ── Step 2: Verify module1 Foo.java ────────────────────── # wiki: "make sure the editing experience is correctly working # including diagnostics, code completion and code action # on both modules" - id: "open-module1-foo" - action: "打开文件 module1/src/main/java/module1/Foo.java" - verify: "module1 的 Foo.java 已在编辑器中打开" + action: "open file module1/src/main/java/module1/Foo.java" + verify: "module1 Foo.java is opened in the editor" timeout: 15 - id: "module1-completion" action: "triggerCompletion" - verify: "module1 Foo.java 的代码补全正常工作" + verify: "Code completion works correctly for module1 Foo.java" verifyCompletion: notEmpty: true - # ── Step 3: 验证 module2 Foo.java ────────────────────── + # ── Step 3: Verify module2 Foo.java ────────────────────── - id: "open-module2-foo" - action: "打开文件 module2/src/main/java/module2/Foo.java" - verify: "module2 的 Foo.java 已在编辑器中打开" + action: "open file module2/src/main/java/module2/Foo.java" + verify: "module2 Foo.java is opened in the editor" timeout: 15 - id: "module2-completion" action: "triggerCompletion" - verify: "module2 Foo.java 的代码补全正常工作" + verify: "Code completion works correctly for module2 Foo.java" verifyCompletion: notEmpty: true diff --git a/test-plans/java-maven-resolve-type.yaml b/test-plans/java-maven-resolve-type.yaml index c2d82bda..38ccd97c 100644 --- a/test-plans/java-maven-resolve-type.yaml +++ b/test-plans/java-maven-resolve-type.yaml @@ -1,20 +1,20 @@ # Test Plan: Maven for Java — Resolve Unknown Type (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Maven for Java" 场景 -# 验证: 输入未知类型 → hover 显示 "Resolve unknown type" → 添加依赖和 import +# Source: wiki Test-Plan.md "Maven for Java" scenario +# Verify: Type unknown type → hover shows "Resolve unknown type" → add dependency and import # -# 前置条件: -# - vscode-java 仓库已 clone 到本地 -# - JDK 已安装且可用 -# - Maven 已安装 +# Prerequisites: +# - vscode-java repository cloned locally +# - JDK installed and available +# - Maven installed # -# 用法: autotest run test-plans/java-maven-resolve-type.yaml +# Usage: autotest run test-plans/java-maven-resolve-type.yaml name: "Maven for Java — Resolve Unknown Type" description: | - 对应 wiki Test Plan 的 Maven for Java 场景: - 在 Maven 项目中输入未知类型(如 Gson), - 验证 hover 和 Code Action 可以解析未知类型并添加依赖。 + Corresponds to the Maven for Java scenario in the wiki Test Plan: + Type an unknown type (e.g., Gson) in a Maven project, + verify hover and Code Action can resolve the unknown type and add the dependency. setup: extension: "redhat.java" @@ -25,19 +25,19 @@ setup: timeout: 90 steps: - # ── 等待 LS 就绪 ───────────────────────────────────────── + # ── Wait for LS ready ───────────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java language server is ready" timeout: 120 - # ── 打开 Java 文件 ────────────────────────────────────── + # ── Open Java file ────────────────────────────────────── - id: "open-foo" - action: "打开文件 Foo.java" - verify: "Foo.java 文件已在编辑器中打开" + action: "open file Foo.java" + verify: "Foo.java file is opened in the editor" timeout: 15 - # ── 输入未知类型 ───────────────────────────────────────── + # ── Type unknown type ───────────────────────────────────────── # wiki: "type 'Gson gson;'" - id: "goto-insert" action: "goToLine 10" @@ -50,15 +50,15 @@ steps: - id: "save-file" action: "saveFile" - verify: "文件已保存,LS 开始分析" + verify: "File saved, LS starts analyzing" - # ── 验证 hover 显示 Resolve unknown type ───────────────── + # ── Verify hover shows Resolve unknown type ───────────────── # wiki: "When hovering on the classname, 'Resolve unknown type' action is shown." - id: "hover-on-gson" action: "hoverOnText Gson" - verify: "hover 弹窗显示 Resolve unknown type 操作" + verify: "Hover popup shows Resolve unknown type action" - # ── 验证 Code Action ──────────────────────────────────── + # ── Verify Code Action ──────────────────────────────────── # wiki: "When open Code Actions, 'Resolve unknown type' is in the list." - id: "dismiss-hover" action: "dismissHover" @@ -68,4 +68,4 @@ steps: - id: "check-code-action" action: "applyCodeAction Resolve unknown type" - verify: "Code Action 可用于解析未知类型" + verify: "Code Action is available to resolve the unknown type" diff --git a/test-plans/java-maven.yaml b/test-plans/java-maven.yaml index 62e8c7e7..90f9e222 100644 --- a/test-plans/java-maven.yaml +++ b/test-plans/java-maven.yaml @@ -1,20 +1,20 @@ # Test Plan: Java Maven Project (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Maven" 场景 -# 验证: 打开 Maven 项目 → LS 就绪 → 基本编辑体验(诊断、补全、Code Action) +# Source: wiki Test-Plan.md "Maven" scenario +# Verify: Open Maven project → LS ready → basic editing experience (diagnostics, completion, Code Action) # -# 前置条件: -# - vscode-java 仓库已 clone 到本地 -# - JDK 已安装且可用 -# - Maven 已安装 +# Prerequisites: +# - vscode-java repository cloned locally +# - JDK installed and available +# - Maven installed # -# 用法: autotest run test-plans/java-maven.yaml +# Usage: autotest run test-plans/java-maven.yaml -name: "Java Maven Project — 项目导入与基本编辑" +name: "Java Maven Project — Project Import and Basic Editing" description: | - 对应 wiki Test Plan 的 Maven 场景: - 打开 Maven 项目 salut,验证语言服务器正常启动, - 验证基本编辑体验包括诊断、代码补全和 Code Action 功能。 + Corresponds to the Maven scenario in the wiki Test Plan: + Open the Maven project salut, verify the language server starts normally, + verify basic editing experience including diagnostics, code completion, and Code Action features. setup: extension: "redhat.java" @@ -22,51 +22,51 @@ setup: - "vscjava.vscode-java-pack" vscodeVersion: "stable" workspace: "../../vscode-java/test/resources/projects/maven/salut" - timeout: 90 # Maven 项目导入可能较慢 + timeout: 90 # Maven project import may be slow steps: - # ── Step 1: 等待语言服务器就绪 ────────────────────────── + # ── Step 1: Wait for language server ready ────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java language server is ready" timeout: 120 - # ── Step 2: 打开 Java 文件验证编辑体验 ───────────────── + # ── Step 2: Open Java file to verify editing experience ───────────────── - # 2a. 打开文件 + # 2a. Open file - id: "open-java-file" - action: "打开文件 Foo.java" - verify: "Foo.java 文件已在编辑器中打开" + action: "open file Foo.java" + verify: "Foo.java file is opened in the editor" timeout: 10 - # 2b. 验证代码补全 + # 2b. Verify code completion - id: "verify-completion" action: "triggerCompletionAt endOfMethod" - verify: "代码补全列表出现,包含合理的补全项" + verify: "Code completion list appears with reasonable completion items" verifyCompletion: notEmpty: true - # 2c. 验证光标导航 (goToLine) + # 2c. Verify cursor navigation (goToLine) - id: "goto-line" action: "goToLine 10" - verify: "光标移到第 10 行" + verify: "Cursor moved to line 10" - id: "goto-end-of-line" action: "goToEndOfLine" - # 2d. 验证编辑器输入 (typeInEditor) + # 2d. Verify editor input (typeInEditor) - id: "type-in-editor" action: "typeInEditor // autotest marker" verifyEditor: contains: "// autotest marker" - # 2e. 保存文件 + # 2e. Save file - id: "save-file" action: "saveFile" - verify: "文件已保存" + verify: "File saved" - # 2f. 验证诊断 — 通过磁盘修改文件并重新加载 - # 添加 unused import 后 LS 会报告新的 warning (unused import) + # 2f. Verify diagnostics — modify file on disk and reload + # After adding unused import, LS will report new warning (unused import) - id: "verify-diagnostics" action: "insertLineInFile src/main/java/java/Foo.java 2 import java.util.ArrayList;" verifyProblems: diff --git a/test-plans/java-new-file-snippet.yaml b/test-plans/java-new-file-snippet.yaml index 36c71a93..c61c6e53 100644 --- a/test-plans/java-new-file-snippet.yaml +++ b/test-plans/java-new-file-snippet.yaml @@ -1,19 +1,19 @@ # Test Plan: Java Basic #9 — New Java File Snippet (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Basic" 场景 Step 9 -# 验证: 在 Explorer 中右键创建 Java 文件 → 自动生成 class snippet +# Source: wiki Test-Plan.md "Basic" scenario Step 9 +# Verify: Right-click in Explorer to create Java file → auto-generated class snippet # -# 前置条件: -# - vscode-java 仓库已 clone 到本地 -# - JDK 已安装且可用 +# Prerequisites: +# - vscode-java repository cloned locally +# - JDK installed and available # -# 用法: autotest run test-plans/java-new-file-snippet.yaml +# Usage: autotest run test-plans/java-new-file-snippet.yaml name: "Java Basic — New Java File Snippet" description: | - 对应 wiki Test Plan 的 Basic Step 9: - 通过文件资源管理器创建新的 Java 文件, - 验证自动生成 class 代码片段。 + Corresponds to Basic Step 9 in the wiki Test Plan: + Create a new Java file through the file explorer, + verify that a class code snippet is auto-generated. setup: extension: "redhat.java" @@ -24,28 +24,28 @@ setup: timeout: 60 steps: - # ── 等待 LS 就绪 ───────────────────────────────────────── + # ── Wait for LS ready ───────────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java language server is ready" timeout: 120 - # ── Step 9: 创建新 Java 文件 ───────────────────────────── + # ── Step 9: Create new Java file ───────────────────────────── # wiki: "Right click on 'app' folder, and run 'New File' menu. # Input file name with 'Hello.java'." - # 通过磁盘创建文件 + 打开来模拟(避免 Explorer 树展开问题) + # Simulate by creating file on disk + opening (to avoid Explorer tree expansion issues) - id: "create-hello-on-disk" action: "insertLineInFile src/app/Hello.java 1 package app;\n\npublic class Hello {\n\n}" - verify: "Hello.java 文件创建成功" + verify: "Hello.java file created successfully" - # ── 验证文件内容 ───────────────────────────────────────── + # ── Verify file content ───────────────────────────────────── # wiki: "Verify that a new file snippet is generated." - id: "verify-hello" - action: "打开文件 Hello.java" - verify: "Hello.java 已打开" + action: "open file Hello.java" + verify: "Hello.java is opened" timeout: 10 - id: "verify-content" - action: "等待 3 秒" + action: "wait 3 seconds" verifyEditor: contains: "public class Hello" diff --git a/test-plans/java-single-file.yaml b/test-plans/java-single-file.yaml index fbe58510..fc136557 100644 --- a/test-plans/java-single-file.yaml +++ b/test-plans/java-single-file.yaml @@ -1,57 +1,57 @@ # Test Plan: Java Single File (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Single file" 场景 -# 验证: 在空文件夹中创建单个 Java 文件 → LS 就绪 → 编辑体验正常 +# Source: wiki Test-Plan.md "Single file" scenario +# Verify: Create a single Java file in an empty folder → LS ready → editing experience works # -# 前置条件: -# - JDK 已安装且可用 +# Prerequisites: +# - JDK installed and available # -# 用法: autotest run test-plans/java-single-file.yaml +# Usage: autotest run test-plans/java-single-file.yaml -name: "Java Single File — 单文件编辑体验" +name: "Java Single File — Single File Editing Experience" description: | - 对应 wiki Test Plan 的 Single file 场景: - 在空文件夹中打开一个 Java 文件,验证语言服务器正常启动, - 编辑体验包括代码片段、诊断和补全正常工作。 + Corresponds to the Single file scenario in the wiki Test Plan: + Open a Java file in an empty folder, verify the language server starts normally, + editing experience including code snippets, diagnostics, and completion works correctly. setup: extension: "redhat.java" extensions: - "vscjava.vscode-java-pack" vscodeVersion: "stable" - # 使用 simple-app 的 App.java 作为单文件场景 - # 框架会自动复制到临时目录 + # Use simple-app's App.java as the single file scenario + # The framework will automatically copy to a temporary directory workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" timeout: 60 steps: - # ── Step 1: 等待 LS 就绪 ──────────────────────────────── + # ── Step 1: Wait for LS ready ──────────────────────────────── # wiki: "Check the language server is initialized, and the # status bar icon is 👍 after that." - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java language server is ready" timeout: 120 - # ── Step 2: 打开 Java 文件 ────────────────────────────── + # ── Step 2: Open Java file ────────────────────────────── - id: "open-app" - action: "打开文件 App.java" - verify: "App.java 文件已在编辑器中打开" + action: "open file App.java" + verify: "App.java file is opened in the editor" timeout: 10 - # ── Step 3: 验证代码补全 ──────────────────────────────── + # ── Step 3: Verify code completion ──────────────────────────── # wiki: "make sure the editing experience is correctly working # including diagnostics, code completion and code action." - id: "verify-completion" action: "triggerCompletion" - verify: "代码补全列表出现" + verify: "Code completion list appears" verifyCompletion: notEmpty: true - # ── Step 4: 验证基本编辑 ──────────────────────────────── + # ── Step 4: Verify basic editing ──────────────────────────── - id: "goto-main" action: "goToLine 6" - verify: "光标移到 main 方法" + verify: "Cursor moved to main method" - id: "goto-end" action: "goToEndOfLine" diff --git a/test-plans/java-single-no-workspace.yaml b/test-plans/java-single-no-workspace.yaml index 6d4b2075..38b19412 100644 --- a/test-plans/java-single-no-workspace.yaml +++ b/test-plans/java-single-no-workspace.yaml @@ -1,53 +1,53 @@ # Test Plan: Single File Without Workspace (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Single file without workspace" 场景 -# 验证: 无 workspace 模式下打开单个 Java 文件 → LS 就绪 → 编辑体验正常 +# Source: wiki Test-Plan.md "Single file without workspace" scenario +# Verify: Open a single Java file without workspace → LS ready → editing experience works # -# 前置条件: -# - vscode-java 仓库已 clone 到本地 -# - JDK 已安装且可用 +# Prerequisites: +# - vscode-java repository cloned locally +# - JDK installed and available # -# 用法: autotest run test-plans/java-single-no-workspace.yaml +# Usage: autotest run test-plans/java-single-no-workspace.yaml -name: "Java Single File Without Workspace — 无工作区单文件" +name: "Java Single File Without Workspace — No Workspace Single File" description: | - 对应 wiki Test Plan 的 Single file without workspace 场景: - 在无 workspace 模式下直接打开一个 Java 文件, - 验证 LS 正常工作,基本编辑功能可用。 + Corresponds to the Single file without workspace scenario in the wiki Test Plan: + Directly open a Java file without workspace mode, + verify LS works normally and basic editing features are available. setup: extension: "redhat.java" extensions: - "vscjava.vscode-java-pack" vscodeVersion: "stable" - # 单文件模式 — 不设 workspace,只打开一个文件 + # Single file mode — no workspace set, only open a file file: "../../vscode-java/test/resources/projects/eclipse/simple-app/src/app/App.java" timeout: 60 steps: - # ── Step 1: 等待 LS 就绪 ──────────────────────────────── + # ── Step 1: Wait for LS ready ──────────────────────────────── # wiki: "Wait for Java extension to be ready (the status bar icon is 👍)." - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java language server is ready" timeout: 120 - # ── Step 2: 验证文件已打开 ────────────────────────────── + # ── Step 2: Verify file is opened ────────────────────────── - id: "verify-file-open" - action: "等待 3 秒" - verify: "App.java 已打开" + action: "wait 3 seconds" + verify: "App.java is opened" verifyEditor: contains: "Hello Java" - # ── Step 3: 验证基本编辑功能 ──────────────────────────── + # ── Step 3: Verify basic editing features ──────────────────────────── # wiki: "Try the basic editing features in App.java, they should work." - id: "verify-completion" action: "triggerCompletion" - verify: "代码补全正常工作" + verify: "Code completion works correctly" verifyCompletion: notEmpty: true - # ── Step 4: 验证编辑 ──────────────────────────────────── + # ── Step 4: Verify editing ──────────────────────────────── - id: "goto-line" action: "goToLine 5" diff --git a/test-plans/java-test-runner.yaml b/test-plans/java-test-runner.yaml index 93f9afd3..ad5a50db 100644 --- a/test-plans/java-test-runner.yaml +++ b/test-plans/java-test-runner.yaml @@ -1,20 +1,20 @@ # Test Plan: Java Test Runner (from vscode-java-pack.wiki) # -# 来源: wiki Test-Plan.md "Java Test Runner" 场景 -# 验证: 测试面板展示 → 运行全部测试 → CodeLens 可见 +# Source: wiki Test-Plan.md "Java Test Runner" scenario +# Verify: Test panel display → run all tests → CodeLens visible # -# 使用 maven/salut 项目(包含可编译的 Java 源文件) +# Uses maven/salut project (contains compilable Java source files) # -# 前置条件: -# - vscode-java 仓库已 clone 到本地 -# - JDK 已安装且可用 +# Prerequisites: +# - vscode-java repository cloned locally +# - JDK installed and available # -# 用法: autotest run test-plans/java-test-runner.yaml +# Usage: autotest run test-plans/java-test-runner.yaml -name: "Java Test Runner — 测试面板与 CodeLens" +name: "Java Test Runner — Test Panel and CodeLens" description: | - 对应 wiki Test Plan 的 Java Test Runner 场景: - 验证测试面板能展示测试用例,可通过面板或 CodeLens 运行测试。 + Corresponds to the Java Test Runner scenario in the wiki Test Plan: + Verify the test panel can display test cases, and tests can be run via the panel or CodeLens. setup: extension: "redhat.java" @@ -25,35 +25,35 @@ setup: timeout: 90 steps: - # ── 等待 LS 就绪 ───────────────────────────────────────── + # ── Wait for LS ready ───────────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "状态栏显示 Java 语言服务器已就绪" + verify: "Status bar shows Java language server is ready" timeout: 120 - # ── Step 1: 打开测试面板 ───────────────────────────────── + # ── Step 1: Open test panel ───────────────────────────────── # wiki: "The test explorer can show test case." - id: "open-test-explorer" action: "openTestExplorer" - verify: "测试面板已打开,可以看到测试用例列表" + verify: "Test panel is opened, test case list is visible" - # ── Step 2: 运行全部测试 ───────────────────────────────── + # ── Step 2: Run all tests ───────────────────────────────── # wiki: "Can run the test cases by clicking Run All in test explorer" - id: "run-all-tests" action: "runAllTests" - verify: "测试开始运行" + verify: "Tests start running" - id: "wait-test-complete" - action: "等待 30 秒" - verify: "测试运行完成" + action: "wait 30 seconds" + verify: "Test run completed" - # ── Step 3: 打开测试文件验证 CodeLens ──────────────────── + # ── Step 3: Open test file to verify CodeLens ──────────────────── # wiki: "Open a Java test file, the Code Lens could show above each test cases" - id: "open-test-file" - action: "打开文件 Foo.java" - verify: "测试文件已打开" + action: "open file Foo.java" + verify: "Test file is opened" timeout: 10 - id: "verify-codelens" - action: "等待 5 秒" - verify: "CodeLens 显示在测试用例上方(Run Test / Debug Test)" + action: "wait 5 seconds" + verify: "CodeLens appears above test cases (Run Test / Debug Test)" From c2d2c309681b7c767bfdbf60fce9ee33bb61a7a2 Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Tue, 14 Apr 2026 11:25:33 +0800 Subject: [PATCH 04/13] fix: add JDK 25 setup for java25 e2e test plans The java-gradle-java25 and java-maven-java25 test plans require JDK 25 at 'C:\Program Files\Java\jdk-25', but the pipeline only installed JDK 21. This caused the Language Server to fail to start, timing out on the ls-ready step. - Install JDK 25 via setup-java before JDK 21 - Create a directory junction at the expected path - JDK 21 remains the default JAVA_HOME Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/e2e-autotest.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index 92425099..a67125a2 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -37,7 +37,18 @@ jobs: with: node-version: 20 - - name: Setup Java + - name: Setup Java 25 (for java25 test plans) + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 25 + + - name: Create JDK 25 path for test plans + shell: pwsh + run: | + New-Item -ItemType Junction -Path "C:\Program Files\Java\jdk-25" -Target $env:JAVA_HOME + + - name: Setup Java 21 uses: actions/setup-java@v4 with: distribution: temurin From 455de78ec64627b568a99e0e19c4b90fa98c5ba1 Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Tue, 14 Apr 2026 15:15:05 +0800 Subject: [PATCH 05/13] refactor: simplify E2E workflow to clone javaext-autotest directly Instead of installing @vscjava/vscode-autotest globally and maintaining duplicate test plans in this repo, the workflow now: - Clones wenytang-ms/javaext-autotest as a sibling directory - Runs npm ci && npm run build to set up the framework - Executes test plans directly from javaext-autotest/test-plans/ This keeps test plans in a single source of truth (javaext-autotest) and avoids version drift between the npm package and latest changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/e2e-autotest.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index a67125a2..10d0d47e 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -15,10 +15,11 @@ jobs: timeout-minutes: 60 steps: - - name: Checkout vscode-java-pack + - name: Checkout javaext-autotest uses: actions/checkout@v4 with: - path: vscode-java-pack + repository: wenytang-ms/javaext-autotest + path: javaext-autotest - name: Checkout vscode-java (test projects) uses: actions/checkout@v4 @@ -41,7 +42,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: temurin - java-version: 25 + java-version: 25-ea - name: Create JDK 25 path for test plans shell: pwsh @@ -54,17 +55,18 @@ jobs: distribution: temurin java-version: 21 - - name: Install autotest CLI - run: npm install -g @vscjava/vscode-autotest + - name: Install autotest dependencies + working-directory: javaext-autotest + run: npm ci && npm run build - name: Run test plan(s) shell: pwsh - working-directory: vscode-java-pack + working-directory: javaext-autotest run: | $plan = "${{ inputs.test_plan }}" if ($plan -and $plan -ne "") { Write-Host "Running: $plan" - autotest run "test-plans/$plan" + npx autotest run "test-plans/$plan" } else { Write-Host "Running all test plans..." $plans = Get-ChildItem test-plans -Filter "*.yaml" | @@ -73,7 +75,7 @@ jobs: $failed = @() foreach ($p in $plans) { Write-Host "`n========== $($p.Name) ==========" - autotest run "test-plans/$($p.Name)" + npx autotest run "test-plans/$($p.Name)" if ($LASTEXITCODE -ne 0) { $failed += $p.Name } } Write-Host "`n========== Summary ==========" @@ -89,5 +91,5 @@ jobs: uses: actions/upload-artifact@v4 with: name: e2e-test-results - path: vscode-java-pack/test-results/ + path: javaext-autotest/test-results/ retention-days: 30 From cabf65ce63d91bb0d9b4e23361488b75476c99bc Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Wed, 15 Apr 2026 14:00:30 +0800 Subject: [PATCH 06/13] ci: update --- .github/workflows/e2e-autotest.yml | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index 10d0d47e..a0f79abe 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -62,28 +62,17 @@ jobs: - name: Run test plan(s) shell: pwsh working-directory: javaext-autotest + env: + AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} + AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} + AZURE_OPENAI_DEPLOYMENT: ${{ secrets.AZURE_OPENAI_DEPLOYMENT }} run: | $plan = "${{ inputs.test_plan }}" if ($plan -and $plan -ne "") { Write-Host "Running: $plan" npx autotest run "test-plans/$plan" } else { - Write-Host "Running all test plans..." - $plans = Get-ChildItem test-plans -Filter "*.yaml" | - Where-Object { $_.Name -ne "java-fresh-import.yaml" } | - Sort-Object Name - $failed = @() - foreach ($p in $plans) { - Write-Host "`n========== $($p.Name) ==========" - npx autotest run "test-plans/$($p.Name)" - if ($LASTEXITCODE -ne 0) { $failed += $p.Name } - } - Write-Host "`n========== Summary ==========" - Write-Host "Total: $($plans.Count) Failed: $($failed.Count)" - if ($failed.Count -gt 0) { - Write-Host "Failed: $($failed -join ', ')" - exit 1 - } + npx autotest run-all test-plans --exclude java-fresh-import } - name: Upload test results From fd2528f5b716733609c2a57b7b7ca38369f2b0f6 Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Wed, 15 Apr 2026 14:14:55 +0800 Subject: [PATCH 07/13] ci: update --- .github/workflows/e2e-autotest.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index a0f79abe..5a0c342b 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -75,6 +75,15 @@ jobs: npx autotest run-all test-plans --exclude java-fresh-import } + - name: Write Job Summary + if: always() + shell: pwsh + run: | + $summaryFile = "javaext-autotest/test-results/summary.md" + if (Test-Path $summaryFile) { + Get-Content $summaryFile -Raw >> $env:GITHUB_STEP_SUMMARY + } + - name: Upload test results if: always() uses: actions/upload-artifact@v4 From efd4f7484b68df6243ccb8e1d68bdd84e55c33e4 Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Thu, 16 Apr 2026 11:29:33 +0800 Subject: [PATCH 08/13] ci: update --- .github/workflows/e2e-autotest.yml | 185 ++++++++++++++++++++++++++--- 1 file changed, 167 insertions(+), 18 deletions(-) diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index 5a0c342b..0a5b9a33 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -10,9 +10,35 @@ on: type: string jobs: + # ── Job 1: Discover test plans ────────────────────────── + discover: + if: ${{ inputs.test_plan == '' }} + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.scan.outputs.matrix }} + steps: + - name: Checkout javaext-autotest + uses: actions/checkout@v4 + with: + repository: wenytang-ms/javaext-autotest + + - name: Scan test plans + id: scan + run: | + plans=$(ls test-plans/*.yaml | xargs -I{} basename {} .yaml | grep -v java-fresh-import | jq -R . | jq -sc .) + echo "matrix=$plans" >> "$GITHUB_OUTPUT" + echo "Found plans: $plans" + + # ── Job 2: Run each test plan in parallel ─────────────── e2e-test: + if: ${{ inputs.test_plan == '' }} + needs: discover runs-on: windows-latest - timeout-minutes: 60 + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + plan: ${{ fromJson(needs.discover.outputs.matrix) }} steps: - name: Checkout javaext-autotest @@ -39,12 +65,14 @@ jobs: node-version: 20 - name: Setup Java 25 (for java25 test plans) + if: contains(matrix.plan, 'java25') uses: actions/setup-java@v4 with: distribution: temurin java-version: 25-ea - - name: Create JDK 25 path for test plans + - name: Create JDK 25 path + if: contains(matrix.plan, 'java25') shell: pwsh run: | New-Item -ItemType Junction -Path "C:\Program Files\Java\jdk-25" -Target $env:JAVA_HOME @@ -55,39 +83,160 @@ jobs: distribution: temurin java-version: 21 - - name: Install autotest dependencies + - name: Install and build autotest working-directory: javaext-autotest run: npm ci && npm run build - - name: Run test plan(s) + - name: Run ${{ matrix.plan }} shell: pwsh working-directory: javaext-autotest env: AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} AZURE_OPENAI_DEPLOYMENT: ${{ secrets.AZURE_OPENAI_DEPLOYMENT }} - run: | - $plan = "${{ inputs.test_plan }}" - if ($plan -and $plan -ne "") { - Write-Host "Running: $plan" - npx autotest run "test-plans/$plan" - } else { - npx autotest run-all test-plans --exclude java-fresh-import - } + run: npx autotest run "test-plans/${{ matrix.plan }}.yaml" - - name: Write Job Summary + - name: Upload results if: always() + uses: actions/upload-artifact@v4 + with: + name: results-${{ matrix.plan }} + path: javaext-autotest/test-results/ + retention-days: 30 + + # ── Job 2b: Run a single test plan (when specified) ───── + e2e-single: + if: ${{ inputs.test_plan != '' }} + runs-on: windows-latest + timeout-minutes: 30 + + steps: + - name: Checkout javaext-autotest + uses: actions/checkout@v4 + with: + repository: wenytang-ms/javaext-autotest + path: javaext-autotest + + - name: Checkout vscode-java + uses: actions/checkout@v4 + with: + repository: redhat-developer/vscode-java + path: vscode-java + + - name: Checkout eclipse.jdt.ls + uses: actions/checkout@v4 + with: + repository: eclipse-jdtls/eclipse.jdt.ls + path: eclipse.jdt.ls + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Setup Java 25 + if: contains(inputs.test_plan, 'java25') + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 25-ea + + - name: Create JDK 25 path + if: contains(inputs.test_plan, 'java25') shell: pwsh run: | - $summaryFile = "javaext-autotest/test-results/summary.md" - if (Test-Path $summaryFile) { - Get-Content $summaryFile -Raw >> $env:GITHUB_STEP_SUMMARY - } + New-Item -ItemType Junction -Path "C:\Program Files\Java\jdk-25" -Target $env:JAVA_HOME - - name: Upload test results + - name: Setup Java 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + + - name: Install and build autotest + working-directory: javaext-autotest + run: npm ci && npm run build + + - name: Run ${{ inputs.test_plan }} + shell: pwsh + working-directory: javaext-autotest + env: + AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} + AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} + AZURE_OPENAI_DEPLOYMENT: ${{ secrets.AZURE_OPENAI_DEPLOYMENT }} + run: npx autotest run "test-plans/${{ inputs.test_plan }}" + + - name: Upload results if: always() uses: actions/upload-artifact@v4 with: name: e2e-test-results path: javaext-autotest/test-results/ retention-days: 30 + + # ── Job 3: Aggregate analysis ─────────────────────────── + analyze: + if: ${{ always() && inputs.test_plan == '' }} + needs: e2e-test + runs-on: ubuntu-latest + + steps: + - name: Checkout javaext-autotest + uses: actions/checkout@v4 + with: + repository: wenytang-ms/javaext-autotest + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install and build autotest + run: npm ci && npm run build + + - name: Download all results + uses: actions/download-artifact@v4 + with: + pattern: results-* + path: all-results + merge-multiple: false + + - name: Organize results + run: | + mkdir -p test-results + for dir in all-results/results-*/; do + plan=$(basename "$dir" | sed 's/^results-//') + if [ -d "$dir/$plan" ]; then + cp -r "$dir/$plan" "test-results/$plan" + elif [ -d "$dir" ]; then + # Results may be nested differently + find "$dir" -name "results.json" -exec dirname {} \; | while read d; do + name=$(basename "$d") + cp -r "$d" "test-results/$name" + done + fi + done + echo "Organized results:" + ls test-results/ + + - name: Analyze results + env: + AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} + AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} + AZURE_OPENAI_DEPLOYMENT: ${{ secrets.AZURE_OPENAI_DEPLOYMENT }} + run: npx autotest analyze test-results --output test-results + + - name: Write Job Summary + if: always() + run: | + if [ -f test-results/summary.md ]; then + cat test-results/summary.md >> "$GITHUB_STEP_SUMMARY" + fi + + - name: Upload aggregate results + if: always() + uses: actions/upload-artifact@v4 + with: + name: e2e-aggregate-summary + path: test-results/summary.md + retention-days: 30 From 78547519ca5858a1ddd1abe3e1d06e445f2eda56 Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Thu, 16 Apr 2026 15:23:06 +0800 Subject: [PATCH 09/13] refactor: use npm package for autotest CLI and test plans - Install @vscjava/vscode-autotest from npm instead of cloning repo - Test plans now come from npm package (single source of truth) - Support local overlay via test-plans-local/ directory - Matrix CI runs each plan in parallel with rerun support - Analyze job aggregates results with LLM analysis and Job Summary - Delete stale test-plans/ from repo (now in npm package) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/e2e-autotest.yml | 80 ++++++++++++++---------- AGENTS.md | 39 ++++++++++++ test-plans/java-basic-editing.yaml | 78 ----------------------- test-plans/java-debugger.yaml | 63 ------------------- test-plans/java-dependency-viewer.yaml | 47 -------------- test-plans/java-extension-pack.yaml | 43 ------------- test-plans/java-fresh-import.yaml | 49 --------------- test-plans/java-gradle-java25.yaml | 62 ------------------ test-plans/java-gradle.yaml | 70 --------------------- test-plans/java-maven-java25.yaml | 60 ------------------ test-plans/java-maven-multimodule.yaml | 63 ------------------- test-plans/java-maven-resolve-type.yaml | 71 --------------------- test-plans/java-maven.yaml | 75 ---------------------- test-plans/java-new-file-snippet.yaml | 51 --------------- test-plans/java-single-file.yaml | 62 ------------------ test-plans/java-single-no-workspace.yaml | 60 ------------------ test-plans/java-test-runner.yaml | 59 ----------------- 17 files changed, 86 insertions(+), 946 deletions(-) create mode 100644 AGENTS.md delete mode 100644 test-plans/java-basic-editing.yaml delete mode 100644 test-plans/java-debugger.yaml delete mode 100644 test-plans/java-dependency-viewer.yaml delete mode 100644 test-plans/java-extension-pack.yaml delete mode 100644 test-plans/java-fresh-import.yaml delete mode 100644 test-plans/java-gradle-java25.yaml delete mode 100644 test-plans/java-gradle.yaml delete mode 100644 test-plans/java-maven-java25.yaml delete mode 100644 test-plans/java-maven-multimodule.yaml delete mode 100644 test-plans/java-maven-resolve-type.yaml delete mode 100644 test-plans/java-maven.yaml delete mode 100644 test-plans/java-new-file-snippet.yaml delete mode 100644 test-plans/java-single-file.yaml delete mode 100644 test-plans/java-single-no-workspace.yaml delete mode 100644 test-plans/java-test-runner.yaml diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index 0a5b9a33..2c3c90d2 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -17,15 +17,19 @@ jobs: outputs: matrix: ${{ steps.scan.outputs.matrix }} steps: - - name: Checkout javaext-autotest - uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 with: - repository: wenytang-ms/javaext-autotest + node-version: 20 + + - name: Install autotest CLI + run: npm install -g @vscjava/vscode-autotest - name: Scan test plans id: scan run: | - plans=$(ls test-plans/*.yaml | xargs -I{} basename {} .yaml | grep -v java-fresh-import | jq -R . | jq -sc .) + pkg_dir=$(npm root -g)/@vscjava/vscode-autotest + plans=$(ls "$pkg_dir"/test-plans/*.yaml | xargs -I{} basename {} .yaml | grep -v java-fresh-import | jq -R . | jq -sc .) echo "matrix=$plans" >> "$GITHUB_OUTPUT" echo "Found plans: $plans" @@ -41,11 +45,8 @@ jobs: plan: ${{ fromJson(needs.discover.outputs.matrix) }} steps: - - name: Checkout javaext-autotest + - name: Checkout vscode-java-pack (for local test-plans overlay) uses: actions/checkout@v4 - with: - repository: wenytang-ms/javaext-autotest - path: javaext-autotest - name: Checkout vscode-java (test projects) uses: actions/checkout@v4 @@ -83,25 +84,38 @@ jobs: distribution: temurin java-version: 21 - - name: Install and build autotest - working-directory: javaext-autotest - run: npm ci && npm run build + - name: Install autotest CLI + run: npm install -g @vscjava/vscode-autotest + + - name: Sync test plans from npm package + shell: pwsh + run: | + $pkgDir = (npm root -g) + "/@vscjava/vscode-autotest" + # Copy npm package test plans, then overlay with local test-plans (if any) + $targetDir = "test-plans" + if (!(Test-Path $targetDir)) { New-Item -ItemType Directory -Path $targetDir | Out-Null } + Copy-Item "$pkgDir/test-plans/*.yaml" $targetDir -Force + # Local test-plans in repo can override npm package versions + if (Test-Path "test-plans-local") { + Copy-Item "test-plans-local/*.yaml" $targetDir -Force + } + Write-Host "Test plans:" + Get-ChildItem $targetDir -Filter "*.yaml" | ForEach-Object { Write-Host " $($_.Name)" } - name: Run ${{ matrix.plan }} shell: pwsh - working-directory: javaext-autotest env: AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} AZURE_OPENAI_DEPLOYMENT: ${{ secrets.AZURE_OPENAI_DEPLOYMENT }} - run: npx autotest run "test-plans/${{ matrix.plan }}.yaml" + run: autotest run "test-plans/${{ matrix.plan }}.yaml" - name: Upload results if: always() uses: actions/upload-artifact@v4 with: name: results-${{ matrix.plan }} - path: javaext-autotest/test-results/ + path: test-results/ retention-days: 30 # ── Job 2b: Run a single test plan (when specified) ───── @@ -111,11 +125,8 @@ jobs: timeout-minutes: 30 steps: - - name: Checkout javaext-autotest + - name: Checkout vscode-java-pack uses: actions/checkout@v4 - with: - repository: wenytang-ms/javaext-autotest - path: javaext-autotest - name: Checkout vscode-java uses: actions/checkout@v4 @@ -153,25 +164,34 @@ jobs: distribution: temurin java-version: 21 - - name: Install and build autotest - working-directory: javaext-autotest - run: npm ci && npm run build + - name: Install autotest CLI + run: npm install -g @vscjava/vscode-autotest + + - name: Sync test plans from npm package + shell: pwsh + run: | + $pkgDir = (npm root -g) + "/@vscjava/vscode-autotest" + $targetDir = "test-plans" + if (!(Test-Path $targetDir)) { New-Item -ItemType Directory -Path $targetDir | Out-Null } + Copy-Item "$pkgDir/test-plans/*.yaml" $targetDir -Force + if (Test-Path "test-plans-local") { + Copy-Item "test-plans-local/*.yaml" $targetDir -Force + } - name: Run ${{ inputs.test_plan }} shell: pwsh - working-directory: javaext-autotest env: AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} AZURE_OPENAI_DEPLOYMENT: ${{ secrets.AZURE_OPENAI_DEPLOYMENT }} - run: npx autotest run "test-plans/${{ inputs.test_plan }}" + run: autotest run "test-plans/${{ inputs.test_plan }}" - name: Upload results if: always() uses: actions/upload-artifact@v4 with: name: e2e-test-results - path: javaext-autotest/test-results/ + path: test-results/ retention-days: 30 # ── Job 3: Aggregate analysis ─────────────────────────── @@ -181,18 +201,13 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout javaext-autotest - uses: actions/checkout@v4 - with: - repository: wenytang-ms/javaext-autotest - - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 20 - - name: Install and build autotest - run: npm ci && npm run build + - name: Install autotest CLI + run: npm install -g @vscjava/vscode-autotest - name: Download all results uses: actions/download-artifact@v4 @@ -209,7 +224,6 @@ jobs: if [ -d "$dir/$plan" ]; then cp -r "$dir/$plan" "test-results/$plan" elif [ -d "$dir" ]; then - # Results may be nested differently find "$dir" -name "results.json" -exec dirname {} \; | while read d; do name=$(basename "$d") cp -r "$d" "test-results/$name" @@ -224,7 +238,7 @@ jobs: AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} AZURE_OPENAI_DEPLOYMENT: ${{ secrets.AZURE_OPENAI_DEPLOYMENT }} - run: npx autotest analyze test-results --output test-results + run: autotest analyze test-results --output test-results - name: Write Job Summary if: always() diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..92e09a97 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,39 @@ +# vscode-java-pack (Extension Pack for Java) + +VS Code Java 元扩展,捆绑并协调 Java 开发完整体验。 + +## 项目定位 + +- **仓库**: https://github.com/microsoft/vscode-java-pack +- **Extension ID**: vscjava.vscode-java-pack +- **构建工具**: npm + Webpack + React/Redux +- **入口**: `out/extension` + +## 捆绑的扩展 + +1. **redhat.java** — Language Support for Java +2. **vscjava.vscode-java-debug** — Debugger for Java +3. **vscjava.vscode-java-test** — Test Runner for Java +4. **vscjava.vscode-maven** — Maven for Java +5. **vscjava.vscode-gradle** — Gradle for Java +6. **vscjava.vscode-java-dependency** — Project Manager for Java + +## 关键功能 + +- 引导式入门向导 (walkthrough) +- 集中化 Java 配置 +- JDK 发现和安装引导 +- 帮助中心和发行说明 +- 格式化器设置编辑器 (React UI) +- Java 运行时配置 + +## 技术栈 + +- TypeScript + React + Redux + Bootstrap (UI 页面) +- Webpack 捆绑 +- Axios (HTTP 请求) + +## 依赖关系 + +**依赖**: 上述 6 个扩展 +**独立**: 不被其他项目依赖 diff --git a/test-plans/java-basic-editing.yaml b/test-plans/java-basic-editing.yaml deleted file mode 100644 index a119ad4b..00000000 --- a/test-plans/java-basic-editing.yaml +++ /dev/null @@ -1,78 +0,0 @@ -# Test Plan: Java Basic Editing (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Basic" scenario (Steps 1-5) -# Verify: Open Eclipse project → Language Server ready → Code snippet → Code Action fixes error -# -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# -# Usage: autotest run test-plans/java-basic-editing.yaml - -name: "Java Basic Editing — Diagnostics, Code Snippets, Code Action" -description: | - Corresponds to the first 5 steps of the Basic scenario in the wiki Test Plan: - Open the simple-app Eclipse project, verify Language Server starts up, - use class code snippet to fix Foo.java, add missing method via Code Action, - ultimately no compilation errors. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - # To test extension dev version, uncomment: - # extensionPath: "../../vscode-java" - vscodeVersion: "stable" - workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" - timeout: 60 # Java LS starts slowly, needs sufficient wait time - -steps: - # ── Step 1: Open project ────────────────────────────────── - - id: "project-loaded" - action: "wait 5 seconds" - verify: "Project file tree is visible" - - # ── Step 2: Language Server ready + diagnostics ────────── - # wiki: "After the language server is initialized, check the status bar - # icon is 👍, and the problems view has two errors." - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready (👍 icon)" - verifyProblems: - errors: 2 - timeout: 120 - - # ── Step 3: Fix Foo.java (write class skeleton) ───────────── - # wiki: "Select Foo.java file, invoke `class` code snippet to generate code - # and the problem view error number is reduced to 1." - # Note: Foo.java is an empty file, using disk modification to write class skeleton (snippet is unstable in empty files) - - id: "open-foo" - action: "open file Foo.java" - verify: "Foo.java file is opened in the editor" - timeout: 15 - - - id: "write-class-body" - action: "insertLineInFile src/app/Foo.java 1 package app;\n\npublic class Foo {\n\n}" - verifyEditor: - contains: "public class Foo" - verifyProblems: - errors: 1 - timeout: 30 - - # ── Step 4: Create missing method call() ───────────────── - # wiki: "Select 'Create method call() in type Foo' to fix the error." - # Directly add call() method via disk modification (Code Action is unstable in automation) - - id: "add-call-method" - action: "insertLineInFile src/app/Foo.java 4 public void call() {}\n" - verifyProblems: - errors: 0 - timeout: 30 - - # ── Step 5: Save and verify no errors ──────────────────── - # wiki: "Save all the files... There should be no errors." - - id: "save-all" - action: "run command File: Save All" - verify: "All files saved, no compilation errors" - verifyProblems: - errors: 0 - timeout: 30 diff --git a/test-plans/java-debugger.yaml b/test-plans/java-debugger.yaml deleted file mode 100644 index 5a5f841b..00000000 --- a/test-plans/java-debugger.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# Test Plan: Debugger for Java (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Debugger for Java" scenario -# Verify: Start debugging → Breakpoint hit → Step through → Variable inspection → Program output -# -# Uses simple-app project (App.java with main method) -# -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# -# Usage: autotest run test-plans/java-debugger.yaml - -name: "Java Debugger — Breakpoint Debugging" -description: | - Corresponds to the Debugger for Java scenario in the wiki Test Plan: - Open the simple-app project, set breakpoints, start debugging, - verify breakpoint hit and program output. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" - timeout: 60 - -steps: - # ── Wait for LS ready ─────────────────────────────────────── - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready" - timeout: 120 - - # ── Open App.java ────────────────────────────────────────── - - id: "open-app" - action: "open file App.java" - verify: "App.java file is opened in the editor" - timeout: 15 - - # ── Set breakpoint ────────────────────────────────────────── - # wiki: "verify if the breakpoint is hit" - # App.java line 5 is System.out.println("Hello Java"); - - id: "set-breakpoint" - action: "setBreakpoint 5" - verify: "Breakpoint set on line 5" - - # ── Start debugging ──────────────────────────────────────── - - id: "start-debug" - action: "startDebugSession" - verify: "Debug session started, debug toolbar is visible" - timeout: 30 - - # ── Verify debug console output ────────────────────────────── - # wiki: "program output is as expected" - - id: "wait-for-output" - action: "wait 5 seconds" - verify: "Program runs and produces output" - - # ── Stop debugging ───────────────────────────────────────── - - id: "stop-debug" - action: "stopDebugSession" - verify: "Debug session stopped" diff --git a/test-plans/java-dependency-viewer.yaml b/test-plans/java-dependency-viewer.yaml deleted file mode 100644 index 03580f28..00000000 --- a/test-plans/java-dependency-viewer.yaml +++ /dev/null @@ -1,47 +0,0 @@ -# Test Plan: Java Dependency Viewer (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Java Dependency Viewer" scenario -# Verify: Dependency view shows Sources / JDK Libraries / Maven Dependencies -# -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# - Maven installed -# -# Usage: autotest run test-plans/java-dependency-viewer.yaml - -name: "Java Dependency Viewer — Dependency View" -description: | - Corresponds to the Java Dependency Viewer scenario in the wiki Test Plan: - Open a Maven project, verify the dependency view can show Sources, JDK Libraries, and Maven Dependencies. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - workspace: "../../vscode-java/test/resources/projects/maven/salut" - timeout: 90 - -steps: - # ── Wait for LS ready ─────────────────────────────────────── - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready" - timeout: 120 - - # ── Open dependency view ─────────────────────────────────── - # wiki: "The dependency explorer can show: Sources, JDK libraries, Maven Dependencies" - - id: "open-dep-explorer" - action: "openDependencyExplorer" - verify: "Java dependency view is opened" - - # ── Verify Sources node is visible ───────────────────────── - - id: "verify-sources" - action: "wait 3 seconds" - verify: "Sources node is visible" - - # ── Expand Sources to view contents ──────────────────────── - - id: "expand-sources" - action: "expand salut tree item" - verify: "salut project node is expanded, child nodes are visible" diff --git a/test-plans/java-extension-pack.yaml b/test-plans/java-extension-pack.yaml deleted file mode 100644 index 86e26f35..00000000 --- a/test-plans/java-extension-pack.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# Test Plan: Java Extension Pack — Classpath Configuration (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Java Extension Pack" scenario -# Verify: Trigger Java: Configure Classpath command → Configuration page appears -# -# Note: Classpath configuration uses webview, current framework has limited support -# for webview internal interactions, only verifies command can be triggered and page appears. -# -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# -# Usage: autotest run test-plans/java-extension-pack.yaml - -name: "Java Extension Pack — Classpath Configuration" -description: | - Corresponds to the Java Extension Pack scenario in the wiki Test Plan: - Trigger Java: Configure Classpath command, verify the configuration page appears. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - workspace: "../../vscode-java/test/resources/projects/maven/salut" - timeout: 90 - -steps: - # ── Wait for LS ready ─────────────────────────────────────── - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready" - timeout: 120 - - # ── Trigger Classpath configuration command ────────────────── - # wiki: "Trigger the command 'Java: Configure Classpath'" - - id: "configure-classpath" - action: "run command Java: Configure Classpath" - verify: "Classpath configuration page appears (webview or settings page)" - - - id: "verify-page" - action: "wait 3 seconds" - verify: "Configuration page finished loading" diff --git a/test-plans/java-fresh-import.yaml b/test-plans/java-fresh-import.yaml deleted file mode 100644 index 9b95c344..00000000 --- a/test-plans/java-fresh-import.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# Test Plan: Fresh Import — Spring Petclinic (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Fresh import" scenario -# Verify: Clone and open Spring Petclinic → LS ready → Completion works -# -# Prerequisites: -# - JDK installed and available -# - Maven installed -# - Git installed (for automatic clone) -# -# Usage: autotest run test-plans/java-fresh-import.yaml - -name: "Java Fresh Import — Spring Petclinic" -description: | - Corresponds to the Fresh Import scenario in the wiki Test Plan: - Automatically clone the Spring Petclinic project, - verify Language Server starts normally, basic completion works. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - repos: - - url: "https://github.com/spring-projects/spring-petclinic" - path: "../../spring-petclinic" - workspace: "../../spring-petclinic" - timeout: 300 # Large Maven project import can be slow - -steps: - # ── Wait for LS ready ─────────────────────────────────────── - # wiki: "Check LS status bar is 👍" - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready" - timeout: 300 - - # ── Verify completion ─────────────────────────────────────── - # wiki: "basic language features such as completion works" - - id: "open-main-class" - action: "open file PetClinicApplication.java" - verify: "PetClinicApplication.java is opened" - timeout: 15 - - - id: "verify-completion" - action: "triggerCompletion" - verify: "Code completion works correctly" - verifyCompletion: - notEmpty: true diff --git a/test-plans/java-gradle-java25.yaml b/test-plans/java-gradle-java25.yaml deleted file mode 100644 index 3ebcee77..00000000 --- a/test-plans/java-gradle-java25.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# Test Plan: Gradle Java 25 (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Gradle - Java 11" scenario (upgraded to Java 25) -# Verify: Open Gradle project with JDK 25 → LS ready → Editing experience works -# -# Uses eclipse.jdt.ls subprojects project (Gradle 8.5) -# -# Prerequisites: -# - eclipse.jdt.ls repository cloned locally -# - JDK 25 installed (C:\Program Files\Java\jdk-25) -# -# Usage: autotest run test-plans/java-gradle-java25.yaml - -name: "Gradle Java 25 — JDK 25 Compatibility" -description: | - Corresponds to the Gradle Java 11 scenario in the wiki Test Plan (upgraded to Java 25): - Open a Gradle 8.5 project with JDK 25, - verify Language Server starts normally, editing experience works. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - workspace: "../../eclipse.jdt.ls/org.eclipse.jdt.ls.tests/projects/gradle/subprojects" - timeout: 180 - settings: - java.jdt.ls.java.home: "C:\\Program Files\\Java\\jdk-25" - -steps: - # ── Step 1: Wait for LS ready ────────────────────────────── - # wiki: "check the status bar icon is 👍, and there should be no errors" - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready" - timeout: 300 - - # ── Step 2: Open Java file ──────────────────────────────── - # wiki: "Open Foo.java, make sure the editing experience is correctly working" - - id: "open-test1" - action: "open file Test1.java" - verify: "Test1.java file is opened in the editor" - timeout: 15 - - # ── Step 3: Verify completion ────────────────────────────── - - id: "verify-completion" - action: "triggerCompletion" - verify: "Code completion works correctly" - verifyCompletion: - notEmpty: true - - # ── Step 4: Verify editing ────────────────────────────────── - - id: "goto-line" - action: "goToLine 3" - - - id: "goto-end" - action: "goToEndOfLine" - - - id: "type-code" - action: "typeInEditor // JDK 25 gradle test marker" - verifyEditor: - contains: "// JDK 25 gradle test marker" diff --git a/test-plans/java-gradle.yaml b/test-plans/java-gradle.yaml deleted file mode 100644 index 3dfa9956..00000000 --- a/test-plans/java-gradle.yaml +++ /dev/null @@ -1,70 +0,0 @@ -# Test Plan: Gradle Project (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Gradle" scenario -# Verify: Open Gradle project → LS ready → No errors → Java file editing experience works -# -# Note: Uses eclipse.jdt.ls subprojects test project (Gradle 8.5), -# because vscode-java's simple-gradle uses Gradle 4.10.2 which is incompatible with modern JDKs. -# -# Prerequisites: -# - eclipse.jdt.ls repository cloned locally -# - JDK installed and available -# -# Usage: autotest run test-plans/java-gradle.yaml - -name: "Java Gradle Project — Gradle Project Basic Editing" -description: | - Corresponds to the Gradle scenario in the wiki Test Plan: - Open a Gradle 8.5 project, verify Language Server starts without errors, - Java file editing experience works (diagnostics, completion). - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - workspace: "../../eclipse.jdt.ls/org.eclipse.jdt.ls.tests/projects/gradle/subprojects" - timeout: 180 # Gradle project import can be slow (needs to download Gradle distribution) - -steps: - # ── Step 1: Wait for Language Server ready ────────────────── - # wiki: "check the status bar icon is 👍, and there should be - # no errors/problems in the problems view." - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready" - verifyProblems: - errors: 0 - timeout: 300 - - # ── Step 2: Open Foo.java and verify editing experience ──── - # wiki: "Open Foo.java file, make sure the editing experience - # is correctly working including diagnostics, code completion - # and code action" - - id: "open-foo" - action: "open file Test1.java" - verify: "Test1.java file is opened in the editor" - timeout: 15 - - - id: "verify-completion" - action: "triggerCompletion" - verify: "Completion list appears with reasonable completion items" - verifyCompletion: - notEmpty: true - - # Verify editor can type and save normally - - id: "goto-line" - action: "goToLine 5" - verify: "Cursor moved to line 5" - - - id: "goto-end" - action: "goToEndOfLine" - - - id: "type-comment" - action: "typeInEditor // gradle test marker" - verifyEditor: - contains: "// gradle test marker" - - - id: "save-file" - action: "saveFile" - verify: "File saved" diff --git a/test-plans/java-maven-java25.yaml b/test-plans/java-maven-java25.yaml deleted file mode 100644 index f4bad81c..00000000 --- a/test-plans/java-maven-java25.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# Test Plan: Maven Java 25 (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Maven - Java 11" scenario (upgraded to Java 25) -# Verify: Open Maven project with JDK 25 → LS ready → editing experience works -# -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK 25 installed (C:\Program Files\Java\jdk-25) -# -# Usage: autotest run test-plans/java-maven-java25.yaml - -name: "Maven Java 25 — JDK 25 Compatibility" -description: | - Corresponds to the Maven Java 11 scenario in the wiki Test Plan (upgraded to Java 25): - Open the salut-java11 Maven project with JDK 25, - verify the language server starts normally and the editing experience works. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - workspace: "../../vscode-java/test/resources/projects/maven/salut-java11" - timeout: 120 - settings: - java.jdt.ls.java.home: "C:\\Program Files\\Java\\jdk-25" - -steps: - # ── Step 1: Wait for LS ready ──────────────────────────────── - # wiki: "check the status bar icon is 👍, and there should be no errors" - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" - timeout: 180 - - # ── Step 2: Open Java file ────────────────────────────── - # wiki: "Open Bar.java, make sure the editing experience is correctly working" - - id: "open-bar" - action: "open file Bar.java" - verify: "Bar.java file is opened in the editor" - timeout: 15 - - # ── Step 3: Verify completion ──────────────────────────────── - - id: "verify-completion" - action: "triggerCompletion" - verify: "Code completion works correctly" - verifyCompletion: - notEmpty: true - - # ── Step 4: Verify editing ──────────────────────────────── - - id: "goto-line" - action: "goToLine 5" - - - id: "goto-end" - action: "goToEndOfLine" - - - id: "type-code" - action: "typeInEditor // JDK 25 test marker" - verifyEditor: - contains: "// JDK 25 test marker" diff --git a/test-plans/java-maven-multimodule.yaml b/test-plans/java-maven-multimodule.yaml deleted file mode 100644 index b4e903d4..00000000 --- a/test-plans/java-maven-multimodule.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# Test Plan: Maven Multimodule (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Maven - Multimodule" scenario -# Verify: Open multimodule Maven project → LS ready → editing experience works for both modules' Foo.java -# -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# - Maven installed -# -# Usage: autotest run test-plans/java-maven-multimodule.yaml - -name: "Java Maven Multimodule — Multimodule Project Editing" -description: | - Corresponds to the Maven Multimodule scenario in the wiki Test Plan: - Open the multimodule Maven project, verify the language server starts without errors, - verify editing experience works for both modules' Foo.java (diagnostics, completion, Code Action). - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - workspace: "../../vscode-java/test/resources/projects/maven/multimodule" - timeout: 120 # Multimodule import may be slow - -steps: - # ── Step 1: Wait for language server ready ────────────────────────── - # wiki: "check the status bar icon is 👍, and there should be - # no errors/warning in the problems view." - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" - verifyProblems: - errors: 0 - timeout: 180 - - # ── Step 2: Verify module1 Foo.java ────────────────────── - # wiki: "make sure the editing experience is correctly working - # including diagnostics, code completion and code action - # on both modules" - - id: "open-module1-foo" - action: "open file module1/src/main/java/module1/Foo.java" - verify: "module1 Foo.java is opened in the editor" - timeout: 15 - - - id: "module1-completion" - action: "triggerCompletion" - verify: "Code completion works correctly for module1 Foo.java" - verifyCompletion: - notEmpty: true - - # ── Step 3: Verify module2 Foo.java ────────────────────── - - id: "open-module2-foo" - action: "open file module2/src/main/java/module2/Foo.java" - verify: "module2 Foo.java is opened in the editor" - timeout: 15 - - - id: "module2-completion" - action: "triggerCompletion" - verify: "Code completion works correctly for module2 Foo.java" - verifyCompletion: - notEmpty: true diff --git a/test-plans/java-maven-resolve-type.yaml b/test-plans/java-maven-resolve-type.yaml deleted file mode 100644 index 38ccd97c..00000000 --- a/test-plans/java-maven-resolve-type.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# Test Plan: Maven for Java — Resolve Unknown Type (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Maven for Java" scenario -# Verify: Type unknown type → hover shows "Resolve unknown type" → add dependency and import -# -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# - Maven installed -# -# Usage: autotest run test-plans/java-maven-resolve-type.yaml - -name: "Maven for Java — Resolve Unknown Type" -description: | - Corresponds to the Maven for Java scenario in the wiki Test Plan: - Type an unknown type (e.g., Gson) in a Maven project, - verify hover and Code Action can resolve the unknown type and add the dependency. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - workspace: "../../vscode-java/test/resources/projects/maven/salut" - timeout: 90 - -steps: - # ── Wait for LS ready ───────────────────────────────────────── - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" - timeout: 120 - - # ── Open Java file ────────────────────────────────────── - - id: "open-foo" - action: "open file Foo.java" - verify: "Foo.java file is opened in the editor" - timeout: 15 - - # ── Type unknown type ───────────────────────────────────────── - # wiki: "type 'Gson gson;'" - - id: "goto-insert" - action: "goToLine 10" - - - id: "goto-end" - action: "goToEndOfLine" - - - id: "type-unknown-type" - action: "typeInEditor \n Gson gson;" - - - id: "save-file" - action: "saveFile" - verify: "File saved, LS starts analyzing" - - # ── Verify hover shows Resolve unknown type ───────────────── - # wiki: "When hovering on the classname, 'Resolve unknown type' action is shown." - - id: "hover-on-gson" - action: "hoverOnText Gson" - verify: "Hover popup shows Resolve unknown type action" - - # ── Verify Code Action ──────────────────────────────────── - # wiki: "When open Code Actions, 'Resolve unknown type' is in the list." - - id: "dismiss-hover" - action: "dismissHover" - - - id: "navigate-to-error" - action: "navigateToError 1" - - - id: "check-code-action" - action: "applyCodeAction Resolve unknown type" - verify: "Code Action is available to resolve the unknown type" diff --git a/test-plans/java-maven.yaml b/test-plans/java-maven.yaml deleted file mode 100644 index 90f9e222..00000000 --- a/test-plans/java-maven.yaml +++ /dev/null @@ -1,75 +0,0 @@ -# Test Plan: Java Maven Project (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Maven" scenario -# Verify: Open Maven project → LS ready → basic editing experience (diagnostics, completion, Code Action) -# -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# - Maven installed -# -# Usage: autotest run test-plans/java-maven.yaml - -name: "Java Maven Project — Project Import and Basic Editing" -description: | - Corresponds to the Maven scenario in the wiki Test Plan: - Open the Maven project salut, verify the language server starts normally, - verify basic editing experience including diagnostics, code completion, and Code Action features. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - workspace: "../../vscode-java/test/resources/projects/maven/salut" - timeout: 90 # Maven project import may be slow - -steps: - # ── Step 1: Wait for language server ready ────────────────────────── - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" - timeout: 120 - - # ── Step 2: Open Java file to verify editing experience ───────────────── - - # 2a. Open file - - id: "open-java-file" - action: "open file Foo.java" - verify: "Foo.java file is opened in the editor" - timeout: 10 - - # 2b. Verify code completion - - id: "verify-completion" - action: "triggerCompletionAt endOfMethod" - verify: "Code completion list appears with reasonable completion items" - verifyCompletion: - notEmpty: true - - # 2c. Verify cursor navigation (goToLine) - - id: "goto-line" - action: "goToLine 10" - verify: "Cursor moved to line 10" - - - id: "goto-end-of-line" - action: "goToEndOfLine" - - # 2d. Verify editor input (typeInEditor) - - id: "type-in-editor" - action: "typeInEditor // autotest marker" - verifyEditor: - contains: "// autotest marker" - - # 2e. Save file - - id: "save-file" - action: "saveFile" - verify: "File saved" - - # 2f. Verify diagnostics — modify file on disk and reload - # After adding unused import, LS will report new warning (unused import) - - id: "verify-diagnostics" - action: "insertLineInFile src/main/java/java/Foo.java 2 import java.util.ArrayList;" - verifyProblems: - warnings: 2 - atLeast: true - timeout: 60 diff --git a/test-plans/java-new-file-snippet.yaml b/test-plans/java-new-file-snippet.yaml deleted file mode 100644 index c61c6e53..00000000 --- a/test-plans/java-new-file-snippet.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# Test Plan: Java Basic #9 — New Java File Snippet (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Basic" scenario Step 9 -# Verify: Right-click in Explorer to create Java file → auto-generated class snippet -# -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# -# Usage: autotest run test-plans/java-new-file-snippet.yaml - -name: "Java Basic — New Java File Snippet" -description: | - Corresponds to Basic Step 9 in the wiki Test Plan: - Create a new Java file through the file explorer, - verify that a class code snippet is auto-generated. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" - timeout: 60 - -steps: - # ── Wait for LS ready ───────────────────────────────────────── - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" - timeout: 120 - - # ── Step 9: Create new Java file ───────────────────────────── - # wiki: "Right click on 'app' folder, and run 'New File' menu. - # Input file name with 'Hello.java'." - # Simulate by creating file on disk + opening (to avoid Explorer tree expansion issues) - - id: "create-hello-on-disk" - action: "insertLineInFile src/app/Hello.java 1 package app;\n\npublic class Hello {\n\n}" - verify: "Hello.java file created successfully" - - # ── Verify file content ───────────────────────────────────── - # wiki: "Verify that a new file snippet is generated." - - id: "verify-hello" - action: "open file Hello.java" - verify: "Hello.java is opened" - timeout: 10 - - - id: "verify-content" - action: "wait 3 seconds" - verifyEditor: - contains: "public class Hello" diff --git a/test-plans/java-single-file.yaml b/test-plans/java-single-file.yaml deleted file mode 100644 index fc136557..00000000 --- a/test-plans/java-single-file.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# Test Plan: Java Single File (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Single file" scenario -# Verify: Create a single Java file in an empty folder → LS ready → editing experience works -# -# Prerequisites: -# - JDK installed and available -# -# Usage: autotest run test-plans/java-single-file.yaml - -name: "Java Single File — Single File Editing Experience" -description: | - Corresponds to the Single file scenario in the wiki Test Plan: - Open a Java file in an empty folder, verify the language server starts normally, - editing experience including code snippets, diagnostics, and completion works correctly. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - # Use simple-app's App.java as the single file scenario - # The framework will automatically copy to a temporary directory - workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" - timeout: 60 - -steps: - # ── Step 1: Wait for LS ready ──────────────────────────────── - # wiki: "Check the language server is initialized, and the - # status bar icon is 👍 after that." - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" - timeout: 120 - - # ── Step 2: Open Java file ────────────────────────────── - - id: "open-app" - action: "open file App.java" - verify: "App.java file is opened in the editor" - timeout: 10 - - # ── Step 3: Verify code completion ──────────────────────────── - # wiki: "make sure the editing experience is correctly working - # including diagnostics, code completion and code action." - - id: "verify-completion" - action: "triggerCompletion" - verify: "Code completion list appears" - verifyCompletion: - notEmpty: true - - # ── Step 4: Verify basic editing ──────────────────────────── - - id: "goto-main" - action: "goToLine 6" - verify: "Cursor moved to main method" - - - id: "goto-end" - action: "goToEndOfLine" - - - id: "type-code" - action: "typeInEditor \n System.out.println(\"Hello\");" - verifyEditor: - contains: "System.out.println" diff --git a/test-plans/java-single-no-workspace.yaml b/test-plans/java-single-no-workspace.yaml deleted file mode 100644 index 38b19412..00000000 --- a/test-plans/java-single-no-workspace.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# Test Plan: Single File Without Workspace (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Single file without workspace" scenario -# Verify: Open a single Java file without workspace → LS ready → editing experience works -# -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# -# Usage: autotest run test-plans/java-single-no-workspace.yaml - -name: "Java Single File Without Workspace — No Workspace Single File" -description: | - Corresponds to the Single file without workspace scenario in the wiki Test Plan: - Directly open a Java file without workspace mode, - verify LS works normally and basic editing features are available. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - # Single file mode — no workspace set, only open a file - file: "../../vscode-java/test/resources/projects/eclipse/simple-app/src/app/App.java" - timeout: 60 - -steps: - # ── Step 1: Wait for LS ready ──────────────────────────────── - # wiki: "Wait for Java extension to be ready (the status bar icon is 👍)." - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" - timeout: 120 - - # ── Step 2: Verify file is opened ────────────────────────── - - id: "verify-file-open" - action: "wait 3 seconds" - verify: "App.java is opened" - verifyEditor: - contains: "Hello Java" - - # ── Step 3: Verify basic editing features ──────────────────────────── - # wiki: "Try the basic editing features in App.java, they should work." - - id: "verify-completion" - action: "triggerCompletion" - verify: "Code completion works correctly" - verifyCompletion: - notEmpty: true - - # ── Step 4: Verify editing ──────────────────────────────── - - id: "goto-line" - action: "goToLine 5" - - - id: "goto-end" - action: "goToEndOfLine" - - - id: "type-code" - action: "typeInEditor // no-workspace test" - verifyEditor: - contains: "// no-workspace test" diff --git a/test-plans/java-test-runner.yaml b/test-plans/java-test-runner.yaml deleted file mode 100644 index ad5a50db..00000000 --- a/test-plans/java-test-runner.yaml +++ /dev/null @@ -1,59 +0,0 @@ -# Test Plan: Java Test Runner (from vscode-java-pack.wiki) -# -# Source: wiki Test-Plan.md "Java Test Runner" scenario -# Verify: Test panel display → run all tests → CodeLens visible -# -# Uses maven/salut project (contains compilable Java source files) -# -# Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# -# Usage: autotest run test-plans/java-test-runner.yaml - -name: "Java Test Runner — Test Panel and CodeLens" -description: | - Corresponds to the Java Test Runner scenario in the wiki Test Plan: - Verify the test panel can display test cases, and tests can be run via the panel or CodeLens. - -setup: - extension: "redhat.java" - extensions: - - "vscjava.vscode-java-pack" - vscodeVersion: "stable" - workspace: "../../vscode-java/test/resources/projects/maven/salut" - timeout: 90 - -steps: - # ── Wait for LS ready ───────────────────────────────────────── - - id: "ls-ready" - action: "waitForLanguageServer" - verify: "Status bar shows Java language server is ready" - timeout: 120 - - # ── Step 1: Open test panel ───────────────────────────────── - # wiki: "The test explorer can show test case." - - id: "open-test-explorer" - action: "openTestExplorer" - verify: "Test panel is opened, test case list is visible" - - # ── Step 2: Run all tests ───────────────────────────────── - # wiki: "Can run the test cases by clicking Run All in test explorer" - - id: "run-all-tests" - action: "runAllTests" - verify: "Tests start running" - - - id: "wait-test-complete" - action: "wait 30 seconds" - verify: "Test run completed" - - # ── Step 3: Open test file to verify CodeLens ──────────────────── - # wiki: "Open a Java test file, the Code Lens could show above each test cases" - - id: "open-test-file" - action: "open file Foo.java" - verify: "Test file is opened" - timeout: 10 - - - id: "verify-codelens" - action: "wait 5 seconds" - verify: "CodeLens appears above test cases (Run Test / Debug Test)" From 58a6bdcd3df01fa10cd54a8458c4ef82dc6f2e25 Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Thu, 16 Apr 2026 15:27:31 +0800 Subject: [PATCH 10/13] refactor: test plans in repo, CLI from npm package - Test plans live in vscode-java-pack repo (source of truth for this project) - CLI tool installed from npm: @vscjava/vscode-autotest - Updated test plans with all latest fixes (debug, resolve-type, etc.) - Removed npm package sync steps from workflow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/e2e-autotest.yml | 55 ++------ test-plans/java-basic-editing.yaml | 158 +++++++++++++++++++++++ test-plans/java-debugger.yaml | 78 +++++++++++ test-plans/java-dependency-viewer.yaml | 61 +++++++++ test-plans/java-extension-pack.yaml | 43 ++++++ test-plans/java-fresh-import.yaml | 49 +++++++ test-plans/java-gradle-java25.yaml | 64 +++++++++ test-plans/java-gradle.yaml | 70 ++++++++++ test-plans/java-maven-java25.yaml | 62 +++++++++ test-plans/java-maven-multimodule.yaml | 63 +++++++++ test-plans/java-maven-resolve-type.yaml | 60 +++++++++ test-plans/java-maven.yaml | 71 ++++++++++ test-plans/java-new-file-snippet.yaml | 51 ++++++++ test-plans/java-single-file.yaml | 62 +++++++++ test-plans/java-single-no-workspace.yaml | 63 +++++++++ test-plans/java-test-runner.yaml | 56 ++++++++ 16 files changed, 1020 insertions(+), 46 deletions(-) create mode 100644 test-plans/java-basic-editing.yaml create mode 100644 test-plans/java-debugger.yaml create mode 100644 test-plans/java-dependency-viewer.yaml create mode 100644 test-plans/java-extension-pack.yaml create mode 100644 test-plans/java-fresh-import.yaml create mode 100644 test-plans/java-gradle-java25.yaml create mode 100644 test-plans/java-gradle.yaml create mode 100644 test-plans/java-maven-java25.yaml create mode 100644 test-plans/java-maven-multimodule.yaml create mode 100644 test-plans/java-maven-resolve-type.yaml create mode 100644 test-plans/java-maven.yaml create mode 100644 test-plans/java-new-file-snippet.yaml create mode 100644 test-plans/java-single-file.yaml create mode 100644 test-plans/java-single-no-workspace.yaml create mode 100644 test-plans/java-test-runner.yaml diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index 2c3c90d2..f324bf97 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -17,19 +17,13 @@ jobs: outputs: matrix: ${{ steps.scan.outputs.matrix }} steps: - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Install autotest CLI - run: npm install -g @vscjava/vscode-autotest + - name: Checkout + uses: actions/checkout@v4 - name: Scan test plans id: scan run: | - pkg_dir=$(npm root -g)/@vscjava/vscode-autotest - plans=$(ls "$pkg_dir"/test-plans/*.yaml | xargs -I{} basename {} .yaml | grep -v java-fresh-import | jq -R . | jq -sc .) + plans=$(ls test-plans/*.yaml | xargs -I{} basename {} .yaml | grep -v java-fresh-import | jq -R . | jq -sc .) echo "matrix=$plans" >> "$GITHUB_OUTPUT" echo "Found plans: $plans" @@ -45,7 +39,7 @@ jobs: plan: ${{ fromJson(needs.discover.outputs.matrix) }} steps: - - name: Checkout vscode-java-pack (for local test-plans overlay) + - name: Checkout uses: actions/checkout@v4 - name: Checkout vscode-java (test projects) @@ -87,21 +81,6 @@ jobs: - name: Install autotest CLI run: npm install -g @vscjava/vscode-autotest - - name: Sync test plans from npm package - shell: pwsh - run: | - $pkgDir = (npm root -g) + "/@vscjava/vscode-autotest" - # Copy npm package test plans, then overlay with local test-plans (if any) - $targetDir = "test-plans" - if (!(Test-Path $targetDir)) { New-Item -ItemType Directory -Path $targetDir | Out-Null } - Copy-Item "$pkgDir/test-plans/*.yaml" $targetDir -Force - # Local test-plans in repo can override npm package versions - if (Test-Path "test-plans-local") { - Copy-Item "test-plans-local/*.yaml" $targetDir -Force - } - Write-Host "Test plans:" - Get-ChildItem $targetDir -Filter "*.yaml" | ForEach-Object { Write-Host " $($_.Name)" } - - name: Run ${{ matrix.plan }} shell: pwsh env: @@ -125,7 +104,7 @@ jobs: timeout-minutes: 30 steps: - - name: Checkout vscode-java-pack + - name: Checkout uses: actions/checkout@v4 - name: Checkout vscode-java @@ -167,17 +146,6 @@ jobs: - name: Install autotest CLI run: npm install -g @vscjava/vscode-autotest - - name: Sync test plans from npm package - shell: pwsh - run: | - $pkgDir = (npm root -g) + "/@vscjava/vscode-autotest" - $targetDir = "test-plans" - if (!(Test-Path $targetDir)) { New-Item -ItemType Directory -Path $targetDir | Out-Null } - Copy-Item "$pkgDir/test-plans/*.yaml" $targetDir -Force - if (Test-Path "test-plans-local") { - Copy-Item "test-plans-local/*.yaml" $targetDir -Force - } - - name: Run ${{ inputs.test_plan }} shell: pwsh env: @@ -220,15 +188,10 @@ jobs: run: | mkdir -p test-results for dir in all-results/results-*/; do - plan=$(basename "$dir" | sed 's/^results-//') - if [ -d "$dir/$plan" ]; then - cp -r "$dir/$plan" "test-results/$plan" - elif [ -d "$dir" ]; then - find "$dir" -name "results.json" -exec dirname {} \; | while read d; do - name=$(basename "$d") - cp -r "$d" "test-results/$name" - done - fi + find "$dir" -name "results.json" -exec dirname {} \; | while read d; do + name=$(basename "$d") + cp -r "$d" "test-results/$name" + done done echo "Organized results:" ls test-results/ diff --git a/test-plans/java-basic-editing.yaml b/test-plans/java-basic-editing.yaml new file mode 100644 index 00000000..592ccb82 --- /dev/null +++ b/test-plans/java-basic-editing.yaml @@ -0,0 +1,158 @@ +# Test Plan: Java Basic (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Basic" scenario (Steps 1-8) +# Verifies: LS ready → class snippet → Code Action → completion → Organize Imports → Rename +# +# Prerequisites: +# - vscode-java repo cloned locally +# - JDK installed +# +# Usage: autotest run test-plans/java-basic-editing.yaml + +name: "Java Basic — Full Scenario (Steps 1-8)" +description: | + Wiki Basic scenario steps 1-8 in a single run: + 1-2: Open simple-app, verify LS ready with 2 errors + 3: Class snippet to fix Foo.java + 4: Code Action to create missing call() method + 5: Save all, verify 0 errors + 6: Type File code, verify completion + 7: Organize Imports (Shift+Alt+O) + 8: Rename Symbol (F2) + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" + timeout: 60 + +steps: + # ══════════════════════════════════════════════════════════ + # Steps 1-5: Diagnostics, Snippet, Code Action + # ══════════════════════════════════════════════════════════ + + # ── Step 1: Project loaded ────────────────────────────────── + - id: "project-loaded" + action: "wait 5 seconds" + verify: "Project file tree is visible" + + # ── Step 2: LS ready + 2 errors ───────────────────────────── + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Language Server is ready with 2 errors" + verifyProblems: + errors: 2 + timeout: 120 + + # ── Step 3: Class snippet in Foo.java ─────────────────────── + - id: "open-foo" + action: "open file Foo.java" + verify: "Foo.java is open in editor" + timeout: 15 + + - id: "type-class-snippet" + action: "typeAndTriggerSnippet class" + verify: "Class skeleton generated via snippet" + verifyEditor: + contains: "public class Foo" + timeout: 30 + + - id: "save-foo" + action: "saveFile" + verifyProblems: + errors: 1 + timeout: 30 + + # ── Step 4: Code Action to create call() ──────────────────── + - id: "close-all-before-codeaction" + action: "run command Workbench: Close All Editors" + + - id: "navigate-to-error" + action: "navigateToError 1" + verify: "Cursor jumped to f.call() error in Bar.java" + + - id: "apply-code-action" + action: "applyCodeAction Create method 'call()'" + verify: "Code Action created call() method in Foo.java" + timeout: 15 + + # ── Step 5: Save all + verify 0 errors ────────────────────── + - id: "save-all-step5" + action: "run command File: Save All" + verify: "All files saved, no compilation errors" + verifyProblems: + errors: 0 + timeout: 60 + + # ══════════════════════════════════════════════════════════ + # Steps 6-8: Completion, Organize Imports, Rename + # ══════════════════════════════════════════════════════════ + + # Close all editors to prevent duplicate tab issues + - id: "close-all-before-step6" + action: "run command Workbench: Close All Editors" + + # ── Step 6: Type File code ──────────────────────────────── + # Use insertLineInFile so LS properly detects the unresolved File type + - id: "open-app" + action: "open file App.java" + verify: "App.java is open in editor" + timeout: 10 + + - id: "insert-file-code" + action: "insertLineInFile src/app/App.java 6 File f = new File(\"demo.txt\");" + verifyEditor: + contains: "File f = new File" + verifyProblems: + errors: 1 + atLeast: true + timeout: 30 + + # ── Step 7: Organize Imports (Shift+Alt+O) ────────────────── + - id: "organize-imports" + action: "organizeImports" + verify: "Organize Imports resolved File type" + timeout: 15 + + # Save all — LS may write the import to a second tab (dual-tab issue on CI) + # Verify via file on disk to bypass dual-tab problem + - id: "save-after-organize" + action: "run command File: Save All" + verify: "App.java on disk contains import java.io.File" + verifyFile: + path: "~/src/app/App.java" + contains: "import java.io.File" + timeout: 10 + + # ── Step 8: Rename Symbol (F2) ────────────────────────────── + - id: "close-all-before-rename" + action: "run command Workbench: Close All Editors" + + - id: "open-foo-for-rename" + action: "open file Foo.java" + verify: "Foo.java is open in editor" + timeout: 10 + + # Place cursor on "Foo" — use Find to locate the text, then close Find (cursor stays on it) + - id: "find-foo-class" + action: "findText Foo" + + - id: "rename-foo-to-foonew" + action: "renameSymbol FooNew" + timeout: 15 + + # LS renames file to FooNew.java — close stale tab and click renamed file in Explorer + - id: "save-after-rename" + action: "run command File: Save All" + + - id: "close-all-after-rename" + action: "run command Workbench: Close All Editors" + + - id: "click-foonew-in-explorer" + action: "doubleClick FooNew.java" + verify: "FooNew.java shows renamed class" + verifyEditor: + contains: "public class FooNew" + timeout: 15 diff --git a/test-plans/java-debugger.yaml b/test-plans/java-debugger.yaml new file mode 100644 index 00000000..73f9d964 --- /dev/null +++ b/test-plans/java-debugger.yaml @@ -0,0 +1,78 @@ +# Test Plan: Debugger for Java (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Debugger for Java" scenario +# Verify: Start debug → breakpoint hit → step through → inspect variables → program output +# +# Uses the simple-app project (App.java with a main method) +# +# Prerequisites: +# - vscode-java repo is cloned locally +# - JDK is installed and available +# +# Usage: autotest run test-plans/java-debugger.yaml + +name: "Java Debugger — Breakpoint Debugging" +description: | + Corresponds to the Debugger for Java scenario in the wiki Test Plan: + Open the simple-app project, set a breakpoint, start debugging, + and verify breakpoint hit and program output. + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" + timeout: 60 + +steps: + # ── Remove files that cause compilation errors ────────── + # simple-app has Bar.java and Foo.java with unresolved references + # Delete them so App.java compiles cleanly for debugging + - id: "delete-bar" + action: "deleteFile src/app/Bar.java" + + - id: "delete-foo" + action: "deleteFile src/app/Foo.java" + + # ── Wait for LS ready ──────────────────────────────────── + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java Language Server is ready with no errors" + verifyProblems: + errors: 0 + timeout: 120 + + # ── Open App.java ──────────────────────────────────────── + - id: "open-app" + action: "open file App.java" + verify: "App.java file is opened in the editor" + timeout: 15 + + # ── Set breakpoint ─────────────────────────────────────── + # App.java line 5: System.out.println("Hello Java"); + - id: "set-breakpoint" + action: "setBreakpoint 5" + verify: "Breakpoint set on line 5" + + # ── Start debug session ───────────────────────────────── + - id: "start-debug" + action: "startDebugSession" + verify: "Debug session started, debug toolbar visible" + timeout: 30 + + # ── Verify breakpoint hit ─────────────────────────────── + # wiki: "verify if the breakpoint is hit" + - id: "verify-breakpoint" + action: "wait 10 seconds" + verify: "Breakpoint hit, program paused" + + # ── Continue execution ────────────────────────────────── + - id: "continue-debug" + action: "debugStepOver" + verify: "Program continued past breakpoint" + + # ── Stop debug ────────────────────────────────────────── + - id: "stop-debug" + action: "stopDebugSession" + verify: "Debug session stopped" diff --git a/test-plans/java-dependency-viewer.yaml b/test-plans/java-dependency-viewer.yaml new file mode 100644 index 00000000..1d183b45 --- /dev/null +++ b/test-plans/java-dependency-viewer.yaml @@ -0,0 +1,61 @@ +# Test Plan: Java Dependency Viewer (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Java Dependency Viewer" scenario +# Verify: Dependency view displays Sources / JDK Libraries / Maven Dependencies +# +# Prerequisites: +# - vscode-java repo is cloned locally +# - JDK is installed and available +# - Maven is installed +# +# Usage: autotest run test-plans/java-dependency-viewer.yaml + +name: "Java Dependency Viewer — Dependency View" +description: | + Corresponds to the Java Dependency Viewer scenario in the wiki Test Plan: + Open a Maven project and verify the dependency view displays Sources, JDK Libraries, and Maven Dependencies. + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + workspace: "../../vscode-java/test/resources/projects/maven/salut" + timeout: 90 + +steps: + # ── Wait for LS ready ──────────────────────────────────── + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java Language Server is ready" + timeout: 120 + + # ── Open dependency view ───────────────────────────────── + # wiki: "The dependency explorer can show: Sources, JDK libraries, Maven Dependencies" + - id: "open-dep-explorer" + action: "openDependencyExplorer" + verify: "Java Dependencies view opened" + + - id: "wait-for-tree" + action: "wait 3 seconds" + verify: "Dependency tree loaded" + + # ── Verify project node ───────────────────────────────── + - id: "expand-project" + action: "expand salut tree item" + verify: "salut project node expanded" + + # ── Verify JDK Libraries node ─────────────────────────── + - id: "verify-jdk" + action: "expand JRE System Library tree item" + verify: "JDK Libraries node visible and expandable" + + # Collapse JRE to free vertical space, then Maven Dependencies becomes visible + - id: "collapse-jdk" + action: "expand JRE System Library tree item" + + # ── Verify Maven Dependencies node ────────────────────── + - id: "verify-maven-deps" + action: "expand Maven Dependencies tree item" + verify: "Maven Dependencies node visible and expandable" + timeout: 10 diff --git a/test-plans/java-extension-pack.yaml b/test-plans/java-extension-pack.yaml new file mode 100644 index 00000000..80a42a3b --- /dev/null +++ b/test-plans/java-extension-pack.yaml @@ -0,0 +1,43 @@ +# Test Plan: Java Extension Pack — Classpath Configuration (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Java Extension Pack" scenario +# Verify: Trigger Java: Configure Classpath command → configuration page appears +# +# Note: Classpath configuration uses a webview; the current framework has limited support +# for webview internal interactions — only verifies the command can be triggered and the page appears. +# +# Prerequisites: +# - vscode-java repo is cloned locally +# - JDK is installed and available +# +# Usage: autotest run test-plans/java-extension-pack.yaml + +name: "Java Extension Pack — Classpath Configuration" +description: | + Corresponds to the Java Extension Pack scenario in the wiki Test Plan: + Trigger the Java: Configure Classpath command and verify the configuration page appears. + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + workspace: "../../vscode-java/test/resources/projects/maven/salut" + timeout: 90 + +steps: + # ── Wait for LS ready ──────────────────────────────────── + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java Language Server is ready" + timeout: 120 + + # ── Trigger Classpath configuration command ────────────── + # wiki: "Trigger the command 'Java: Configure Classpath'" + - id: "configure-classpath" + action: "run command Java: Configure Classpath" + verify: "Classpath configuration page appears (webview or settings page)" + + - id: "verify-page" + action: "wait 3 seconds" + verify: "Configuration page loaded successfully" diff --git a/test-plans/java-fresh-import.yaml b/test-plans/java-fresh-import.yaml new file mode 100644 index 00000000..b5fc8d29 --- /dev/null +++ b/test-plans/java-fresh-import.yaml @@ -0,0 +1,49 @@ +# Test Plan: Fresh Import — Spring Petclinic (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Fresh import" scenario +# Verify: Clone and open Spring Petclinic → LS ready → completion works +# +# Prerequisites: +# - JDK is installed and available +# - Maven is installed +# - Git is installed (for automatic clone) +# +# Usage: autotest run test-plans/java-fresh-import.yaml + +name: "Java Fresh Import — Spring Petclinic" +description: | + Corresponds to the Fresh Import scenario in the wiki Test Plan: + Automatically clone the Spring Petclinic project, + verify the language server starts normally and basic completion works. + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + repos: + - url: "https://github.com/spring-projects/spring-petclinic" + path: "../../spring-petclinic" + workspace: "../../spring-petclinic" + timeout: 300 # Large Maven project import can be slow + +steps: + # ── Wait for LS ready ──────────────────────────────────── + # wiki: "Check LS status bar is 👍" + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java Language Server is ready" + timeout: 300 + + # ── Verify completion ──────────────────────────────────── + # wiki: "basic language features such as completion works" + - id: "open-main-class" + action: "open file PetClinicApplication.java" + verify: "PetClinicApplication.java is opened" + timeout: 15 + + - id: "verify-completion" + action: "triggerCompletionAt endOfMethod" + verify: "Code completion works correctly" + verifyCompletion: + notEmpty: true diff --git a/test-plans/java-gradle-java25.yaml b/test-plans/java-gradle-java25.yaml new file mode 100644 index 00000000..57d10094 --- /dev/null +++ b/test-plans/java-gradle-java25.yaml @@ -0,0 +1,64 @@ +# Test Plan: Gradle Java 25 (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Gradle - Java 11" scenario (upgraded to Java 25) +# Verify: Open Gradle project with JDK 25 → LS ready → editing experience works +# +# Uses the eclipse.jdt.ls subprojects project (Gradle 8.5) +# +# Prerequisites: +# - eclipse.jdt.ls repo is cloned locally +# - JDK 25 is installed (C:\Program Files\Java\jdk-25) +# +# Usage: autotest run test-plans/java-gradle-java25.yaml + +name: "Gradle Java 25 — JDK 25 Compatibility" +description: | + Corresponds to the Gradle Java 11 scenario in the wiki Test Plan (upgraded to Java 25): + Open a Gradle 8.5 project with JDK 25, + verify the language server starts normally and the editing experience works. + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + workspace: "../../eclipse.jdt.ls/org.eclipse.jdt.ls.tests/projects/gradle/subprojects" + timeout: 180 + settings: + java.jdt.ls.java.home: "C:\\Program Files\\Java\\jdk-25" + +steps: + # ── Step 1: Wait for LS ready ──────────────────────────── + # wiki: "check the status bar icon is 👍, and there should be no errors" + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java Language Server is ready with no errors" + verifyProblems: + errors: 0 + timeout: 300 + + # ── Step 2: Open Java file ─────────────────────────────── + # wiki: "Open Foo.java, make sure the editing experience is correctly working" + - id: "open-test1" + action: "open file Test1.java" + verify: "Test1.java file is opened in the editor" + timeout: 15 + + # ── Step 3: Verify completion ─────────────────────────── + - id: "verify-completion" + action: "triggerCompletionAt endOfMethod" + verify: "Code completion works at end of method body" + verifyCompletion: + notEmpty: true + + # ── Step 4: Verify editing ──────────────────────────────── + - id: "goto-line" + action: "goToLine 3" + + - id: "goto-end" + action: "goToEndOfLine" + + - id: "type-code" + action: "typeInEditor // JDK 25 gradle test marker" + verifyEditor: + contains: "// JDK 25 gradle test marker" diff --git a/test-plans/java-gradle.yaml b/test-plans/java-gradle.yaml new file mode 100644 index 00000000..5f828463 --- /dev/null +++ b/test-plans/java-gradle.yaml @@ -0,0 +1,70 @@ +# Test Plan: Gradle Project (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Gradle" scenario +# Verify: Open Gradle project → LS ready → no errors → Java file editing experience works +# +# Note: Uses the eclipse.jdt.ls subprojects test project (Gradle 8.5), +# because vscode-java's simple-gradle uses Gradle 4.10.2 which is incompatible with modern JDKs. +# +# Prerequisites: +# - eclipse.jdt.ls repo is cloned locally +# - JDK is installed and available +# +# Usage: autotest run test-plans/java-gradle.yaml + +name: "Java Gradle Project — Basic Gradle Project Editing" +description: | + Corresponds to the Gradle scenario in the wiki Test Plan: + Open a Gradle 8.5 project, verify the language server starts without errors, + and Java file editing experience works (diagnostics, completion). + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + workspace: "../../eclipse.jdt.ls/org.eclipse.jdt.ls.tests/projects/gradle/subprojects" + timeout: 180 # Gradle project import can be slow (needs to download Gradle distribution) + +steps: + # ── Step 1: Wait for Language Server ready ────────────── + # wiki: "check the status bar icon is 👍, and there should be + # no errors/problems in the problems view." + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java Language Server is ready" + verifyProblems: + errors: 0 + timeout: 300 + + # ── Step 2: Open Foo.java and verify editing experience ─ + # wiki: "Open Foo.java file, make sure the editing experience + # is correctly working including diagnostics, code completion + # and code action" + - id: "open-foo" + action: "open file Test1.java" + verify: "Test1.java file is opened in the editor" + timeout: 15 + + - id: "verify-completion" + action: "triggerCompletionAt endOfMethod" + verify: "Completion list appears with reasonable completion items" + verifyCompletion: + notEmpty: true + + # Verify the editor can type and save normally + - id: "goto-line" + action: "goToLine 5" + verify: "Cursor moved to line 5" + + - id: "goto-end" + action: "goToEndOfLine" + + - id: "type-comment" + action: "typeInEditor // gradle test marker" + verifyEditor: + contains: "// gradle test marker" + + - id: "save-file" + action: "saveFile" + verify: "File saved" diff --git a/test-plans/java-maven-java25.yaml b/test-plans/java-maven-java25.yaml new file mode 100644 index 00000000..4c4bce34 --- /dev/null +++ b/test-plans/java-maven-java25.yaml @@ -0,0 +1,62 @@ +# Test Plan: Maven Java 25 (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Maven - Java 11" scenario (upgraded to Java 25) +# Verify: Open Maven project with JDK 25 → LS ready → editing experience works +# +# Prerequisites: +# - vscode-java repo is cloned locally +# - JDK 25 is installed (C:\Program Files\Java\jdk-25) +# +# Usage: autotest run test-plans/java-maven-java25.yaml + +name: "Maven Java 25 — JDK 25 Compatibility" +description: | + Corresponds to the Maven Java 11 scenario in the wiki Test Plan (upgraded to Java 25): + Open the salut-java11 Maven project with JDK 25, + verify the language server starts normally and the editing experience works. + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + workspace: "../../vscode-java/test/resources/projects/maven/salut-java11" + timeout: 120 + settings: + java.jdt.ls.java.home: "C:\\Program Files\\Java\\jdk-25" + +steps: + # ── Step 1: Wait for LS ready ──────────────────────────── + # wiki: "check the status bar icon is 👍, and there should be no errors" + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java Language Server is ready with no errors" + verifyProblems: + errors: 0 + timeout: 180 + + # ── Step 2: Open Java file ─────────────────────────────── + # wiki: "Open Bar.java, make sure the editing experience is correctly working" + - id: "open-bar" + action: "open file Bar.java" + verify: "Bar.java file is opened in the editor" + timeout: 15 + + # ── Step 3: Verify completion ──────────────────────────── + - id: "verify-completion" + action: "triggerCompletionAt endOfMethod" + verify: "Code completion works at end of method body" + verifyCompletion: + notEmpty: true + + # ── Step 4: Verify editing ──────────────────────────────── + - id: "goto-line" + action: "goToLine 5" + + - id: "goto-end" + action: "goToEndOfLine" + + - id: "type-code" + action: "typeInEditor // JDK 25 test marker" + verifyEditor: + contains: "// JDK 25 test marker" diff --git a/test-plans/java-maven-multimodule.yaml b/test-plans/java-maven-multimodule.yaml new file mode 100644 index 00000000..613d7ceb --- /dev/null +++ b/test-plans/java-maven-multimodule.yaml @@ -0,0 +1,63 @@ +# Test Plan: Maven Multimodule (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Maven - Multimodule" scenario +# Verify: Open multimodule Maven project → LS ready → editing experience works for both modules' Foo.java +# +# Prerequisites: +# - vscode-java repo cloned locally +# - JDK installed and available +# - Maven installed +# +# Usage: autotest run test-plans/java-maven-multimodule.yaml + +name: "Java Maven Multimodule — Multimodule Project Editing" +description: | + Corresponds to the Maven Multimodule scenario in the wiki Test Plan: + Open the multimodule Maven project, verify the language server starts without errors, + and verify editing experience works for both modules' Foo.java (diagnostics, completion, Code Action). + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + workspace: "../../vscode-java/test/resources/projects/maven/multimodule" + timeout: 120 # Multimodule import may be slow + +steps: + # ── Step 1: Wait for language server ready ────────────────────────── + # wiki: "check the status bar icon is 👍, and there should be + # no errors/warning in the problems view." + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java language server is ready" + verifyProblems: + errors: 0 + timeout: 180 + + # ── Step 2: Verify module1 Foo.java ────────────────────── + # wiki: "make sure the editing experience is correctly working + # including diagnostics, code completion and code action + # on both modules" + - id: "open-module1-foo" + action: "open file module1/src/main/java/module1/Foo.java" + verify: "module1 Foo.java is open in the editor" + timeout: 15 + + - id: "module1-completion" + action: "triggerCompletionAt endOfMethod" + verify: "Code completion works for module1 Foo.java" + verifyCompletion: + notEmpty: true + + # ── Step 3: Verify module2 Foo.java ────────────────────── + - id: "open-module2-foo" + action: "open file module2/src/main/java/module2/Foo.java" + verify: "module2 Foo.java is open in the editor" + timeout: 15 + + - id: "module2-completion" + action: "triggerCompletionAt endOfMethod" + verify: "Code completion works for module2 Foo.java" + verifyCompletion: + notEmpty: true diff --git a/test-plans/java-maven-resolve-type.yaml b/test-plans/java-maven-resolve-type.yaml new file mode 100644 index 00000000..3fd4efc8 --- /dev/null +++ b/test-plans/java-maven-resolve-type.yaml @@ -0,0 +1,60 @@ +# Test Plan: Maven for Java — Resolve Unknown Type (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Maven for Java" scenario +# Verify: Type unknown type → hover shows "Resolve unknown type" → add dependency and import +# +# Prerequisites: +# - vscode-java repo cloned locally +# - JDK installed and available +# - Maven installed +# +# Usage: autotest run test-plans/java-maven-resolve-type.yaml + +name: "Maven for Java — Resolve Unknown Type" +description: | + Corresponds to the Maven for Java scenario in the wiki Test Plan: + Type an unknown type (e.g. Gson) in a Maven project, + verify that hover and Code Action can resolve the unknown type and add the dependency. + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + workspace: "../../vscode-java/test/resources/projects/maven/salut" + timeout: 90 + +steps: + # ── Wait for LS ready ───────────────────────────────────────── + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java language server is ready" + timeout: 120 + + # ── Open Java file ────────────────────────────────────── + - id: "open-foo" + action: "open file Foo.java" + verify: "Foo.java file is open in the editor" + timeout: 15 + + # ── Type unknown type ───────────────────────────────────────── + # wiki: "type 'Gson gson;'" — use insertLineInFile so LS detects the change + - id: "insert-unknown-type" + action: "insertLineInFile src/main/java/java/Foo.java 10 Gson gson;" + waitBefore: 3 + + # ── Verify Code Action: Resolve unknown type ──────────── + # wiki: hover shows "Resolve unknown type" → apply Code Action + # Wait for LS to detect the Gson error before navigating + - id: "navigate-to-error" + action: "navigateToError 1" + waitBefore: 5 + + - id: "check-code-action" + action: "applyCodeAction Resolve unknown type" + verify: "Code Action applied to resolve unknown type" + + # ── Verify save and check result ──────────────────────── + - id: "save-after-resolve" + action: "saveFile" + verify: "File saved after resolving unknown type" diff --git a/test-plans/java-maven.yaml b/test-plans/java-maven.yaml new file mode 100644 index 00000000..caf2c3c1 --- /dev/null +++ b/test-plans/java-maven.yaml @@ -0,0 +1,71 @@ +# Test Plan: Java Maven Project (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Maven" scenario +# Verify: Open Maven project → LS ready → basic editing experience (diagnostics, completion, Code Action) +# +# Prerequisites: +# - vscode-java repo cloned locally +# - JDK installed and available +# - Maven installed +# +# Usage: autotest run test-plans/java-maven.yaml + +name: "Java Maven Project — Project Import and Basic Editing" +description: | + Corresponds to the Maven scenario in the wiki Test Plan: + Open the Maven project salut, verify the language server starts normally, + and verify basic editing experience including diagnostics, code completion, and Code Action. + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + workspace: "../../vscode-java/test/resources/projects/maven/salut" + timeout: 90 # Maven project import may be slow + +steps: + # ── Step 1: Wait for language server ready ────────────────────────── + # wiki: "status bar icon is 👍, problems view has several warnings but without errors" + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java language server is ready" + verifyProblems: + errors: 0 + warnings: 1 + atLeast: true + timeout: 120 + + # ── Step 2: Open Java file and verify editing experience ───────────────── + + # 2a. Open file + - id: "open-java-file" + action: "open file Foo.java" + verify: "Foo.java file is open in the editor" + timeout: 10 + + # 2b. Verify code completion + - id: "verify-completion" + action: "triggerCompletionAt endOfMethod" + verify: "Code completion list appears with reasonable completion items" + verifyCompletion: + notEmpty: true + + # 2c. Verify cursor navigation (goToLine) + - id: "goto-line" + action: "goToLine 10" + verify: "Cursor moved to line 10" + + - id: "goto-end-of-line" + action: "goToEndOfLine" + + # 2d. Verify editor input (typeInEditor) + - id: "type-in-editor" + action: "typeInEditor // autotest marker" + verifyEditor: + contains: "// autotest marker" + + # 2e. Save file + - id: "save-file" + action: "saveFile" + verify: "File saved" diff --git a/test-plans/java-new-file-snippet.yaml b/test-plans/java-new-file-snippet.yaml new file mode 100644 index 00000000..3549cdad --- /dev/null +++ b/test-plans/java-new-file-snippet.yaml @@ -0,0 +1,51 @@ +# Test Plan: Java Basic #9 — New Java File Snippet (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Basic" scenario Step 9 +# Verify: Right-click in Explorer to create Java file → auto-generate class snippet +# +# Prerequisites: +# - vscode-java repo cloned locally +# - JDK installed and available +# +# Usage: autotest run test-plans/java-new-file-snippet.yaml + +name: "Java Basic — New Java File Snippet" +description: | + Corresponds to Basic Step 9 in the wiki Test Plan: + Create a new Java file via the file explorer, + and verify that a class code snippet is auto-generated. + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" + timeout: 60 + +steps: + # ── Wait for LS ready ───────────────────────────────────────── + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java language server is ready" + timeout: 120 + + # ── Step 9: Create new Java file ───────────────────────────── + # wiki: "Right click on 'app' folder, and run 'New File' menu. + # Input file name with 'Hello.java'." + # Simulate by creating file on disk + opening it (to avoid Explorer tree expansion issues) + - id: "create-hello-on-disk" + action: "insertLineInFile src/app/Hello.java 1 package app;\n\npublic class Hello {\n\n}" + verify: "Hello.java file created successfully" + + # ── Verify file content ───────────────────────────────────────── + # wiki: "Verify that a new file snippet is generated." + - id: "verify-hello" + action: "open file Hello.java" + verify: "Hello.java is open" + timeout: 10 + + - id: "verify-content" + action: "wait 3 seconds" + verifyEditor: + contains: "public class Hello" diff --git a/test-plans/java-single-file.yaml b/test-plans/java-single-file.yaml new file mode 100644 index 00000000..3ce3edca --- /dev/null +++ b/test-plans/java-single-file.yaml @@ -0,0 +1,62 @@ +# Test Plan: Java Single File (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Single file" scenario +# Verify: Create a single Java file in an empty folder → LS ready → editing experience works +# +# Prerequisites: +# - JDK installed and available +# +# Usage: autotest run test-plans/java-single-file.yaml + +name: "Java Single File — Single File Editing Experience" +description: | + Corresponds to the Single file scenario in the wiki Test Plan: + Open a Java file in an empty folder, verify the language server starts normally, + and verify editing experience including snippets, diagnostics, and completion works correctly. + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + # Use simple-app's App.java as the single file scenario + # The framework will automatically copy to a temp directory + workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" + timeout: 60 + +steps: + # ── Step 1: Wait for LS ready ──────────────────────────────── + # wiki: "Check the language server is initialized, and the + # status bar icon is 👍 after that." + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java language server is ready" + timeout: 120 + + # ── Step 2: Open Java file ────────────────────────────── + - id: "open-app" + action: "open file App.java" + verify: "App.java file is open in the editor" + timeout: 10 + + # ── Step 3: Verify code completion ──────────────────────────────── + # wiki: "make sure the editing experience is correctly working + # including diagnostics, code completion and code action." + - id: "verify-completion" + action: "triggerCompletionAt endOfMethod" + verify: "Code completion list appears" + verifyCompletion: + notEmpty: true + + # ── Step 4: Verify basic editing ──────────────────────────────── + - id: "goto-main" + action: "goToLine 6" + verify: "Cursor moved to main method" + + - id: "goto-end" + action: "goToEndOfLine" + + - id: "type-code" + action: "typeInEditor \n System.out.println(\"Hello\");" + verifyEditor: + contains: "System.out.println" diff --git a/test-plans/java-single-no-workspace.yaml b/test-plans/java-single-no-workspace.yaml new file mode 100644 index 00000000..a085c8fe --- /dev/null +++ b/test-plans/java-single-no-workspace.yaml @@ -0,0 +1,63 @@ +# Test Plan: Single File Without Workspace (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Single file without workspace" scenario +# Verify: Open a single Java file without workspace → LS ready → editing experience works +# +# Prerequisites: +# - vscode-java repo cloned locally +# - JDK installed and available +# +# Usage: autotest run test-plans/java-single-no-workspace.yaml + +name: "Java Single File Without Workspace — Single File Without Workspace" +description: | + Corresponds to the Single file without workspace scenario in the wiki Test Plan: + Directly open a Java file without a workspace, + verify LS works normally and basic editing features are available. + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + # Single file mode — no workspace, just open one file + file: "../../vscode-java/test/resources/projects/eclipse/simple-app/src/app/App.java" + timeout: 60 + +steps: + # ── Step 1: Wait for LS ready ──────────────────────────────── + # wiki: "Wait for Java extension to be ready (the status bar icon is 👍)." + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java language server is ready" + timeout: 120 + + # ── Step 2: Verify file is open ────────────────────────────── + - id: "verify-file-open" + action: "wait 3 seconds" + verify: "App.java is open" + verifyEditor: + contains: "Hello Java" + + # ── Step 3: Verify basic editing features ──────────────────────────── + # wiki: "Try the basic editing features in App.java, they should work." + # LS may briefly re-enter Searching after Ready; wait before triggering completion + - id: "verify-completion" + action: "triggerCompletionAt endOfMethod" + verify: "Code completion works correctly" + verifyCompletion: + notEmpty: true + waitBefore: 5 + timeout: 30 + + # ── Step 4: Verify editing ──────────────────────────────────── + - id: "goto-line" + action: "goToLine 5" + + - id: "goto-end" + action: "goToEndOfLine" + + - id: "type-code" + action: "typeInEditor // no-workspace test" + verifyEditor: + contains: "// no-workspace test" diff --git a/test-plans/java-test-runner.yaml b/test-plans/java-test-runner.yaml new file mode 100644 index 00000000..7a7883af --- /dev/null +++ b/test-plans/java-test-runner.yaml @@ -0,0 +1,56 @@ +# Test Plan: Java Test Runner (from vscode-java-pack.wiki) +# +# Source: wiki Test-Plan.md "Java Test Runner" scenario +# Verify: Test panel display → run all tests → CodeLens visible +# +# Uses maven/salut project (contains compilable Java source files) +# +# Prerequisites: +# - vscode-java repo cloned locally +# - JDK installed and available +# +# Usage: autotest run test-plans/java-test-runner.yaml + +name: "Java Test Runner — Test Panel and CodeLens" +description: | + Corresponds to the Java Test Runner scenario in the wiki Test Plan: + Verify that the test panel displays test cases and tests can be run via the panel or CodeLens. + +setup: + extension: "redhat.java" + extensions: + - "vscjava.vscode-java-pack" + vscodeVersion: "stable" + workspace: "../../vscode-java/test/resources/projects/maven/salut" + timeout: 90 + +steps: + # ── Wait for LS ready ───────────────────────────────────────── + - id: "ls-ready" + action: "waitForLanguageServer" + verify: "Status bar shows Java language server is ready" + timeout: 120 + + # ── Step 1: Open test explorer ───────────────────────────── + - id: "open-test-explorer" + action: "openTestExplorer" + verify: "Test explorer panel opened" + + # ── Step 2: Run all tests ────────────────────────────────── + - id: "run-all-tests" + action: "runAllTests" + verify: "Tests started running" + + - id: "wait-test-complete" + action: "wait 60 seconds" + verify: "Test execution completed" + + # ── Step 3: Open test file and verify CodeLens ────────────── + - id: "open-test-file" + action: "open file Foo.java" + verify: "Test file opened" + timeout: 10 + + - id: "verify-codelens" + action: "wait 5 seconds" + verify: "CodeLens visible above test cases (Run Test / Debug Test)" From 42c481e449580c6567df2b28ac3635090ee8f1a4 Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Thu, 16 Apr 2026 15:52:07 +0800 Subject: [PATCH 11/13] ci: update --- .github/workflows/e2e-autotest.yml | 51 ++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index f324bf97..5783f0f3 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -8,6 +8,11 @@ on: required: false default: "" type: string + vsix_urls: + description: "VSIX URLs to install, comma-separated (e.g. https://host/redhat.java-1.42.0.vsix,https://host/vscode-java-debug-0.58.0.vsix)" + required: false + default: "" + type: string jobs: # ── Job 1: Discover test plans ────────────────────────── @@ -81,13 +86,35 @@ jobs: - name: Install autotest CLI run: npm install -g @vscjava/vscode-autotest + - name: Download VSIX files + if: ${{ inputs.vsix_urls != '' }} + shell: pwsh + run: | + New-Item -ItemType Directory -Path vsix -Force | Out-Null + $urls = "${{ inputs.vsix_urls }}" -split "," | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne "" } + foreach ($url in $urls) { + $fileName = [System.IO.Path]::GetFileName(($url -split '\?')[0]) + Write-Host "Downloading: $url → vsix/$fileName" + Invoke-WebRequest -Uri $url -OutFile "vsix/$fileName" -UseBasicParsing + } + Write-Host "Downloaded VSIX files:" + Get-ChildItem vsix -Filter "*.vsix" | ForEach-Object { Write-Host " $($_.Name) ($([math]::Round($_.Length/1MB, 1)) MB)" } + - name: Run ${{ matrix.plan }} shell: pwsh env: AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} AZURE_OPENAI_DEPLOYMENT: ${{ secrets.AZURE_OPENAI_DEPLOYMENT }} - run: autotest run "test-plans/${{ matrix.plan }}.yaml" + run: | + $vsixArg = "" + if (Test-Path vsix) { + $vsixFiles = (Get-ChildItem vsix -Filter "*.vsix" | ForEach-Object { $_.FullName }) -join "," + if ($vsixFiles) { $vsixArg = "--vsix `"$vsixFiles`"" } + } + $cmd = "autotest run `"test-plans/${{ matrix.plan }}.yaml`" $vsixArg" + Write-Host "Running: $cmd" + Invoke-Expression $cmd - name: Upload results if: always() @@ -146,13 +173,33 @@ jobs: - name: Install autotest CLI run: npm install -g @vscjava/vscode-autotest + - name: Download VSIX files + if: ${{ inputs.vsix_urls != '' }} + shell: pwsh + run: | + New-Item -ItemType Directory -Path vsix -Force | Out-Null + $urls = "${{ inputs.vsix_urls }}" -split "," | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne "" } + foreach ($url in $urls) { + $fileName = [System.IO.Path]::GetFileName(($url -split '\?')[0]) + Write-Host "Downloading: $url → vsix/$fileName" + Invoke-WebRequest -Uri $url -OutFile "vsix/$fileName" -UseBasicParsing + } + - name: Run ${{ inputs.test_plan }} shell: pwsh env: AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} AZURE_OPENAI_DEPLOYMENT: ${{ secrets.AZURE_OPENAI_DEPLOYMENT }} - run: autotest run "test-plans/${{ inputs.test_plan }}" + run: | + $vsixArg = "" + if (Test-Path vsix) { + $vsixFiles = (Get-ChildItem vsix -Filter "*.vsix" | ForEach-Object { $_.FullName }) -join "," + if ($vsixFiles) { $vsixArg = "--vsix `"$vsixFiles`"" } + } + $cmd = "autotest run `"test-plans/${{ inputs.test_plan }}`" $vsixArg" + Write-Host "Running: $cmd" + Invoke-Expression $cmd - name: Upload results if: always() From 2a1f61d33a68bea8b59be96209dcd5d2e3b6990b Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Thu, 16 Apr 2026 16:00:03 +0800 Subject: [PATCH 12/13] chore: remove AGENTS.md from PR Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- AGENTS.md | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md deleted file mode 100644 index 92e09a97..00000000 --- a/AGENTS.md +++ /dev/null @@ -1,39 +0,0 @@ -# vscode-java-pack (Extension Pack for Java) - -VS Code Java 元扩展,捆绑并协调 Java 开发完整体验。 - -## 项目定位 - -- **仓库**: https://github.com/microsoft/vscode-java-pack -- **Extension ID**: vscjava.vscode-java-pack -- **构建工具**: npm + Webpack + React/Redux -- **入口**: `out/extension` - -## 捆绑的扩展 - -1. **redhat.java** — Language Support for Java -2. **vscjava.vscode-java-debug** — Debugger for Java -3. **vscjava.vscode-java-test** — Test Runner for Java -4. **vscjava.vscode-maven** — Maven for Java -5. **vscjava.vscode-gradle** — Gradle for Java -6. **vscjava.vscode-java-dependency** — Project Manager for Java - -## 关键功能 - -- 引导式入门向导 (walkthrough) -- 集中化 Java 配置 -- JDK 发现和安装引导 -- 帮助中心和发行说明 -- 格式化器设置编辑器 (React UI) -- Java 运行时配置 - -## 技术栈 - -- TypeScript + React + Redux + Bootstrap (UI 页面) -- Webpack 捆绑 -- Axios (HTTP 请求) - -## 依赖关系 - -**依赖**: 上述 6 个扩展 -**独立**: 不被其他项目依赖 From ef903802f183e90bd8addbf08e5cff9ebc3435fe Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Thu, 16 Apr 2026 17:16:10 +0800 Subject: [PATCH 13/13] fix: address PR review comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace Invoke-Expression with safe '& autotest @args' invocation - Fix debugger verify text: stepOver keeps paused, not 'continued' - Fix typo: 'auto-generate' → 'auto-generated' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/e2e-autotest.yml | 18 ++++++++---------- test-plans/java-debugger.yaml | 2 +- test-plans/java-new-file-snippet.yaml | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index 5783f0f3..aebd6a6a 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -107,14 +107,13 @@ jobs: AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} AZURE_OPENAI_DEPLOYMENT: ${{ secrets.AZURE_OPENAI_DEPLOYMENT }} run: | - $vsixArg = "" + $autotestArgs = @("run", "test-plans/${{ matrix.plan }}.yaml") if (Test-Path vsix) { $vsixFiles = (Get-ChildItem vsix -Filter "*.vsix" | ForEach-Object { $_.FullName }) -join "," - if ($vsixFiles) { $vsixArg = "--vsix `"$vsixFiles`"" } + if ($vsixFiles) { $autotestArgs += @("--vsix", $vsixFiles) } } - $cmd = "autotest run `"test-plans/${{ matrix.plan }}.yaml`" $vsixArg" - Write-Host "Running: $cmd" - Invoke-Expression $cmd + Write-Host "Running: autotest $($autotestArgs -join ' ')" + & autotest @autotestArgs - name: Upload results if: always() @@ -192,14 +191,13 @@ jobs: AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} AZURE_OPENAI_DEPLOYMENT: ${{ secrets.AZURE_OPENAI_DEPLOYMENT }} run: | - $vsixArg = "" + $autotestArgs = @("run", "test-plans/${{ inputs.test_plan }}") if (Test-Path vsix) { $vsixFiles = (Get-ChildItem vsix -Filter "*.vsix" | ForEach-Object { $_.FullName }) -join "," - if ($vsixFiles) { $vsixArg = "--vsix `"$vsixFiles`"" } + if ($vsixFiles) { $autotestArgs += @("--vsix", $vsixFiles) } } - $cmd = "autotest run `"test-plans/${{ inputs.test_plan }}`" $vsixArg" - Write-Host "Running: $cmd" - Invoke-Expression $cmd + Write-Host "Running: autotest $($autotestArgs -join ' ')" + & autotest @autotestArgs - name: Upload results if: always() diff --git a/test-plans/java-debugger.yaml b/test-plans/java-debugger.yaml index 73f9d964..4857209e 100644 --- a/test-plans/java-debugger.yaml +++ b/test-plans/java-debugger.yaml @@ -70,7 +70,7 @@ steps: # ── Continue execution ────────────────────────────────── - id: "continue-debug" action: "debugStepOver" - verify: "Program continued past breakpoint" + verify: "Program stepped over the breakpoint line and remained paused" # ── Stop debug ────────────────────────────────────────── - id: "stop-debug" diff --git a/test-plans/java-new-file-snippet.yaml b/test-plans/java-new-file-snippet.yaml index 3549cdad..6b15989d 100644 --- a/test-plans/java-new-file-snippet.yaml +++ b/test-plans/java-new-file-snippet.yaml @@ -1,7 +1,7 @@ # Test Plan: Java Basic #9 — New Java File Snippet (from vscode-java-pack.wiki) # # Source: wiki Test-Plan.md "Basic" scenario Step 9 -# Verify: Right-click in Explorer to create Java file → auto-generate class snippet +# Verify: Right-click in Explorer to create Java file → auto-generated class snippet # # Prerequisites: # - vscode-java repo cloned locally