11# Test Plan: Java Basic Editing (from vscode-java-pack.wiki)
22#
3- # 来源 : wiki Test-Plan.md "Basic" 场景 (Steps 1-5)
4- # 验证: 打开 Eclipse 项目 → 语言服务器就绪 → 代码片段 → Code Action 修复错误
3+ # Source : wiki Test-Plan.md "Basic" scenario (Steps 1-5)
4+ # Verify: Open Eclipse project → Language Server ready → Code snippet → Code Action fixes error
55#
6- # 前置条件 :
7- # - vscode-java 仓库已 clone 到本地
8- # - JDK 已安装且可用
6+ # Prerequisites :
7+ # - vscode-java repository cloned locally
8+ # - JDK installed and available
99#
10- # 用法 : autotest run test-plans/java-basic-editing.yaml
10+ # Usage : autotest run test-plans/java-basic-editing.yaml
1111
12- name : " Java Basic Editing — 诊断、代码片段、 Code Action"
12+ name : " Java Basic Editing — Diagnostics, Code Snippets, Code Action"
1313description : |
14- 对应 wiki Test Plan 的 Basic 场景前 5 步 :
15- 打开 simple-app Eclipse 项目,验证语言服务器启动,
16- 使用 class 代码片段修复 Foo.java,通过 Code Action 补全缺失方法,
17- 最终编译无错误。
14+ Corresponds to the first 5 steps of the Basic scenario in the wiki Test Plan :
15+ Open the simple-app Eclipse project, verify Language Server starts up,
16+ use class code snippet to fix Foo.java, add missing method via Code Action,
17+ ultimately no compilation errors.
1818
1919setup :
2020 extension : " redhat.java"
2121 extensions :
2222 - " vscjava.vscode-java-pack"
23- # 如果需要测试扩展开发版本,取消注释 :
23+ # To test extension dev version, uncomment :
2424 # extensionPath: "../../vscode-java"
2525 vscodeVersion : " stable"
2626 workspace : " ../../vscode-java/test/resources/projects/eclipse/simple-app"
27- timeout : 60 # Java LS 启动较慢,需要足够等待时间
27+ timeout : 60 # Java LS starts slowly, needs sufficient wait time
2828
2929steps :
30- # ── Step 1: 打开项目 ──── ──────────────────────────────────
30+ # ── Step 1: Open project ──────────────────────────────────
3131 - id : " project-loaded"
32- action : " 等待 5 秒 "
33- verify : " 项目文件树可见 "
32+ action : " wait 5 seconds "
33+ verify : " Project file tree is visible "
3434
35- # ── Step 2: 语言服务器就绪 + 诊断 ────────────── ──────────
35+ # ── Step 2: Language Server ready + diagnostics ──────────
3636 # wiki: "After the language server is initialized, check the status bar
3737 # icon is 👍, and the problems view has two errors."
3838 - id : " ls-ready"
3939 action : " waitForLanguageServer"
40- verify : " 状态栏显示 Java 语言服务器已就绪(👍 图标) "
40+ verify : " Status bar shows Java Language Server is ready (👍 icon) "
4141 verifyProblems :
4242 errors : 2
4343 timeout : 120
4444
45- # ── Step 3: 修复 Foo.java(写入 class 代码骨架) ────────────
45+ # ── Step 3: Fix Foo.java (write class skeleton) ─ ────────────
4646 # wiki: "Select Foo.java file, invoke `class` code snippet to generate code
4747 # and the problem view error number is reduced to 1."
48- # 注意 : Foo.java 是空文件,使用磁盘修改写入 class 骨架( snippet 在空文件中不稳定)
48+ # Note : Foo.java is an empty file, using disk modification to write class skeleton ( snippet is unstable in empty files)
4949 - id : " open-foo"
50- action : " 打开文件 Foo.java"
51- verify : " Foo.java 文件已在编辑器中打开 "
50+ action : " open file Foo.java"
51+ verify : " Foo.java file is opened in the editor "
5252 timeout : 15
5353
5454 - id : " write-class-body"
@@ -59,20 +59,20 @@ steps:
5959 errors : 1
6060 timeout : 30
6161
62- # ── Step 4: 创建缺失方法 call() ───────── ─────────────────
62+ # ── Step 4: Create missing method call() ─────────────────
6363 # wiki: "Select 'Create method call() in type Foo' to fix the error."
64- # 直接通过磁盘修改添加 call() 方法( Code Action 在自动化中不稳定)
64+ # Directly add call() method via disk modification ( Code Action is unstable in automation)
6565 - id : " add-call-method"
6666 action : " insertLineInFile src/app/Foo.java 4 public void call() {}\n "
6767 verifyProblems :
6868 errors : 0
6969 timeout : 30
7070
71- # ── Step 5: 保存并验证无错误 ───────── ────────────────────
71+ # ── Step 5: Save and verify no errors ────────────────────
7272 # wiki: "Save all the files... There should be no errors."
7373 - id : " save-all"
74- action : " 执行命令 File: Save All"
75- verify : " 所有文件已保存,编译无错误 "
74+ action : " run command File: Save All"
75+ verify : " All files saved, no compilation errors "
7676 verifyProblems :
7777 errors : 0
7878 timeout : 30
0 commit comments