diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index 92425099..aebd6a6a 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -8,17 +8,44 @@ 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 ────────────────────────── + discover: + if: ${{ inputs.test_plan == '' }} + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.scan.outputs.matrix }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - 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 vscode-java-pack + - name: Checkout uses: actions/checkout@v4 - with: - path: vscode-java-pack - name: Checkout vscode-java (test projects) uses: actions/checkout@v4 @@ -37,7 +64,20 @@ jobs: with: node-version: 20 - - name: Setup Java + - 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 + if: contains(matrix.plan, 'java25') + 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 @@ -46,37 +86,179 @@ jobs: - name: Install autotest CLI run: npm install -g @vscjava/vscode-autotest - - name: Run test plan(s) + - name: Download VSIX files + if: ${{ inputs.vsix_urls != '' }} shell: pwsh - working-directory: vscode-java-pack run: | - $plan = "${{ inputs.test_plan }}" - if ($plan -and $plan -ne "") { - Write-Host "Running: $plan" - 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) ==========" - 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 - } + 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: Upload test results + - 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: | + $autotestArgs = @("run", "test-plans/${{ matrix.plan }}.yaml") + if (Test-Path vsix) { + $vsixFiles = (Get-ChildItem vsix -Filter "*.vsix" | ForEach-Object { $_.FullName }) -join "," + if ($vsixFiles) { $autotestArgs += @("--vsix", $vsixFiles) } + } + Write-Host "Running: autotest $($autotestArgs -join ' ')" + & autotest @autotestArgs + + - name: Upload results + if: always() + uses: actions/upload-artifact@v4 + with: + name: results-${{ matrix.plan }} + path: 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 + uses: actions/checkout@v4 + + - 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: | + 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 + java-version: 21 + + - 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: | + $autotestArgs = @("run", "test-plans/${{ inputs.test_plan }}") + if (Test-Path vsix) { + $vsixFiles = (Get-ChildItem vsix -Filter "*.vsix" | ForEach-Object { $_.FullName }) -join "," + if ($vsixFiles) { $autotestArgs += @("--vsix", $vsixFiles) } + } + Write-Host "Running: autotest $($autotestArgs -join ' ')" + & autotest @autotestArgs + + - name: Upload results if: always() uses: actions/upload-artifact@v4 with: name: e2e-test-results - path: vscode-java-pack/test-results/ + path: test-results/ + retention-days: 30 + + # ── Job 3: Aggregate analysis ─────────────────────────── + analyze: + if: ${{ always() && inputs.test_plan == '' }} + needs: e2e-test + runs-on: ubuntu-latest + + 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: 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 + 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/ + + - 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: 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 diff --git a/test-plans/java-basic-editing.yaml b/test-plans/java-basic-editing.yaml index a119ad4b..592ccb82 100644 --- a/test-plans/java-basic-editing.yaml +++ b/test-plans/java-basic-editing.yaml @@ -1,78 +1,158 @@ -# Test Plan: Java Basic Editing (from vscode-java-pack.wiki) +# Test Plan: Java Basic (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 +# Source: wiki Test-Plan.md "Basic" scenario (Steps 1-8) +# Verifies: LS ready → class snippet → Code Action → completion → Organize Imports → Rename # # Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available +# - vscode-java repo cloned locally +# - JDK installed # # Usage: autotest run test-plans/java-basic-editing.yaml -name: "Java Basic Editing — Diagnostics, Code Snippets, Code Action" +name: "Java Basic — Full Scenario (Steps 1-8)" 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 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" - # 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 steps: - # ── Step 1: Open project ────────────────────────────────── + # ══════════════════════════════════════════════════════════ + # 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: Language Server ready + diagnostics ────────── - # wiki: "After the language server is initialized, check the status bar - # icon is 👍, and the problems view has two errors." + # ── Step 2: LS ready + 2 errors ───────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" - verify: "Status bar shows Java Language Server is ready (👍 icon)" + verify: "Status bar shows Language Server is ready with 2 errors" 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) + # ── Step 3: Class snippet in Foo.java ─────────────────────── - id: "open-foo" action: "open file Foo.java" - verify: "Foo.java file is opened in the editor" + verify: "Foo.java is open in editor" timeout: 15 - - id: "write-class-body" - action: "insertLineInFile src/app/Foo.java 1 package app;\n\npublic class Foo {\n\n}" + - id: "type-class-snippet" + action: "typeAndTriggerSnippet class" + verify: "Class skeleton generated via snippet" 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" + - id: "save-foo" + action: "saveFile" verifyProblems: - errors: 0 + errors: 1 timeout: 30 - # ── Step 5: Save and verify no errors ──────────────────── - # wiki: "Save all the files... There should be no errors." - - id: "save-all" + # ── 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-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..4857209e 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 +# Verify: Start debug → breakpoint hit → step through → inspect variables → program output # -# Uses simple-app project (App.java with main method) +# Uses the simple-app project (App.java with a main method) # # Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available +# - 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 breakpoints, start debugging, - verify breakpoint hit and program output. + Open the simple-app project, set a breakpoint, start debugging, + and verify breakpoint hit and program output. setup: extension: "redhat.java" @@ -26,38 +26,53 @@ setup: timeout: 60 steps: - # ── Wait for LS ready ─────────────────────────────────────── + # ── 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" + verify: "Status bar shows Java Language Server is ready with no errors" + verifyProblems: + errors: 0 timeout: 120 - # ── Open App.java ────────────────────────────────────────── + # ── 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"); + # ── Set breakpoint ─────────────────────────────────────── + # App.java line 5: System.out.println("Hello Java"); - id: "set-breakpoint" action: "setBreakpoint 5" verify: "Breakpoint set on line 5" - # ── Start debugging ──────────────────────────────────────── + # ── Start debug session ───────────────────────────────── - id: "start-debug" action: "startDebugSession" - verify: "Debug session started, debug toolbar is visible" + verify: "Debug session started, debug toolbar 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" + # ── 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 stepped over the breakpoint line and remained paused" - # ── Stop debugging ───────────────────────────────────────── + # ── 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 index 03580f28..1d183b45 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 +# Verify: Dependency view displays Sources / JDK Libraries / Maven Dependencies # # Prerequisites: -# - vscode-java repository cloned locally -# - JDK installed and available -# - Maven installed +# - 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, verify the dependency view can show Sources, JDK Libraries, and Maven Dependencies. + Open a Maven project and verify the dependency view displays Sources, JDK Libraries, and Maven Dependencies. setup: extension: "redhat.java" @@ -24,24 +24,38 @@ setup: timeout: 90 steps: - # ── Wait for LS ready ─────────────────────────────────────── + # ── Wait for LS ready ──────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" verify: "Status bar shows Java Language Server is ready" timeout: 120 - # ── Open dependency view ─────────────────────────────────── + # ── 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 Dependencies view opened" - # ── Verify Sources node is visible ───────────────────────── - - id: "verify-sources" + - id: "wait-for-tree" action: "wait 3 seconds" - verify: "Sources node is visible" + verify: "Dependency tree loaded" - # ── Expand Sources to view contents ──────────────────────── - - id: "expand-sources" + # ── Verify project node ───────────────────────────────── + - id: "expand-project" action: "expand salut tree item" - verify: "salut project node is expanded, child nodes are visible" + 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 index 86e26f35..80a42a3b 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 +# 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. +# 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 repository cloned locally -# - JDK installed and available +# - 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 Java: Configure Classpath command, verify the configuration page appears. + Trigger the Java: Configure Classpath command and verify the configuration page appears. setup: extension: "redhat.java" @@ -26,13 +26,13 @@ setup: timeout: 90 steps: - # ── Wait for LS ready ─────────────────────────────────────── + # ── Wait for LS ready ──────────────────────────────────── - id: "ls-ready" action: "waitForLanguageServer" verify: "Status bar shows Java Language Server is ready" timeout: 120 - # ── Trigger Classpath configuration command ────────────────── + # ── Trigger Classpath configuration command ────────────── # wiki: "Trigger the command 'Java: Configure Classpath'" - id: "configure-classpath" action: "run command Java: Configure Classpath" @@ -40,4 +40,4 @@ steps: - id: "verify-page" action: "wait 3 seconds" - verify: "Configuration page finished loading" + verify: "Configuration page loaded successfully" diff --git a/test-plans/java-fresh-import.yaml b/test-plans/java-fresh-import.yaml index 9b95c344..b5fc8d29 100644 --- a/test-plans/java-fresh-import.yaml +++ b/test-plans/java-fresh-import.yaml @@ -1,12 +1,12 @@ # 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 +# Verify: Clone and open Spring Petclinic → LS ready → completion works # # Prerequisites: -# - JDK installed and available -# - Maven installed -# - Git installed (for automatic clone) +# - JDK is installed and available +# - Maven is installed +# - Git is installed (for automatic clone) # # Usage: autotest run test-plans/java-fresh-import.yaml @@ -14,7 +14,7 @@ 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. + verify the language server starts normally and basic completion works. setup: extension: "redhat.java" @@ -28,14 +28,14 @@ setup: timeout: 300 # Large Maven project import can be slow steps: - # ── Wait for LS ready ─────────────────────────────────────── + # ── 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 ─────────────────────────────────────── + # ── Verify completion ──────────────────────────────────── # wiki: "basic language features such as completion works" - id: "open-main-class" action: "open file PetClinicApplication.java" @@ -43,7 +43,7 @@ steps: timeout: 15 - id: "verify-completion" - action: "triggerCompletion" + 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 index 3ebcee77..57d10094 100644 --- a/test-plans/java-gradle-java25.yaml +++ b/test-plans/java-gradle-java25.yaml @@ -1,13 +1,13 @@ # 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 +# Verify: Open Gradle project with JDK 25 → LS ready → editing experience works # -# Uses eclipse.jdt.ls subprojects project (Gradle 8.5) +# Uses the eclipse.jdt.ls subprojects project (Gradle 8.5) # # Prerequisites: -# - eclipse.jdt.ls repository cloned locally -# - JDK 25 installed (C:\Program Files\Java\jdk-25) +# - 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 @@ -15,7 +15,7 @@ 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. + verify the language server starts normally and the editing experience works. setup: extension: "redhat.java" @@ -28,28 +28,30 @@ setup: java.jdt.ls.java.home: "C:\\Program Files\\Java\\jdk-25" steps: - # ── Step 1: Wait for LS ready ────────────────────────────── + # ── 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" + verify: "Status bar shows Java Language Server is ready with no errors" + verifyProblems: + errors: 0 timeout: 300 - # ── Step 2: Open Java file ──────────────────────────────── + # ── 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 ────────────────────────────── + # ── Step 3: Verify completion ─────────────────────────── - id: "verify-completion" - action: "triggerCompletion" - verify: "Code completion works correctly" + action: "triggerCompletionAt endOfMethod" + verify: "Code completion works at end of method body" verifyCompletion: notEmpty: true - # ── Step 4: Verify editing ────────────────────────────────── + # ── 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 3dfa9956..5f828463 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 +# Verify: Open Gradle project → LS ready → no errors → Java file editing experience works # -# Note: Uses eclipse.jdt.ls subprojects test project (Gradle 8.5), +# 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 repository cloned locally -# - JDK installed and available +# - eclipse.jdt.ls repo is cloned locally +# - JDK is installed and available # # Usage: autotest run test-plans/java-gradle.yaml -name: "Java Gradle Project — Gradle Project Basic Editing" +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 Language Server starts without errors, - Java file editing experience works (diagnostics, completion). + 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" @@ -27,7 +27,7 @@ setup: timeout: 180 # Gradle project import can be slow (needs to download Gradle distribution) steps: - # ── Step 1: Wait for Language Server ready ────────────────── + # ── 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" @@ -37,7 +37,7 @@ steps: errors: 0 timeout: 300 - # ── Step 2: Open Foo.java and verify editing experience ──── + # ── 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" @@ -47,12 +47,12 @@ steps: timeout: 15 - id: "verify-completion" - action: "triggerCompletion" + action: "triggerCompletionAt endOfMethod" verify: "Completion list appears with reasonable completion items" verifyCompletion: notEmpty: true - # Verify editor can type and save normally + # Verify the editor can type and save normally - id: "goto-line" action: "goToLine 5" verify: "Cursor moved to line 5" diff --git a/test-plans/java-maven-java25.yaml b/test-plans/java-maven-java25.yaml index f4bad81c..4c4bce34 100644 --- a/test-plans/java-maven-java25.yaml +++ b/test-plans/java-maven-java25.yaml @@ -4,8 +4,8 @@ # 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) +# - 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 @@ -26,24 +26,26 @@ setup: java.jdt.ls.java.home: "C:\\Program Files\\Java\\jdk-25" steps: - # ── Step 1: Wait for LS ready ──────────────────────────────── + # ── 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" + verify: "Status bar shows Java Language Server is ready with no errors" + verifyProblems: + errors: 0 timeout: 180 - # ── Step 2: Open Java file ────────────────────────────── + # ── 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 ──────────────────────────────── + # ── Step 3: Verify completion ──────────────────────────── - id: "verify-completion" - action: "triggerCompletion" - verify: "Code completion works correctly" + action: "triggerCompletionAt endOfMethod" + verify: "Code completion works at end of method body" verifyCompletion: notEmpty: true diff --git a/test-plans/java-maven-multimodule.yaml b/test-plans/java-maven-multimodule.yaml index b4e903d4..613d7ceb 100644 --- a/test-plans/java-maven-multimodule.yaml +++ b/test-plans/java-maven-multimodule.yaml @@ -4,7 +4,7 @@ # Verify: Open multimodule Maven project → LS ready → editing experience works for both modules' Foo.java # # Prerequisites: -# - vscode-java repository cloned locally +# - vscode-java repo cloned locally # - JDK installed and available # - Maven installed # @@ -14,7 +14,7 @@ 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). + and verify editing experience works for both modules' Foo.java (diagnostics, completion, Code Action). setup: extension: "redhat.java" @@ -41,23 +41,23 @@ steps: # 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" + verify: "module1 Foo.java is open in the editor" timeout: 15 - id: "module1-completion" - action: "triggerCompletion" - verify: "Code completion works correctly for module1 Foo.java" + 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 opened in the editor" + verify: "module2 Foo.java is open in the editor" timeout: 15 - id: "module2-completion" - action: "triggerCompletion" - verify: "Code completion works correctly for module2 Foo.java" + 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 index 38ccd97c..3fd4efc8 100644 --- a/test-plans/java-maven-resolve-type.yaml +++ b/test-plans/java-maven-resolve-type.yaml @@ -4,7 +4,7 @@ # Verify: Type unknown type → hover shows "Resolve unknown type" → add dependency and import # # Prerequisites: -# - vscode-java repository cloned locally +# - vscode-java repo cloned locally # - JDK installed and available # - Maven installed # @@ -13,8 +13,8 @@ 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. + 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" @@ -34,38 +34,27 @@ steps: # ── Open Java file ────────────────────────────────────── - id: "open-foo" action: "open file Foo.java" - verify: "Foo.java file is opened in the editor" + verify: "Foo.java file is open 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" - + # 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 is available to resolve the 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 index 90f9e222..caf2c3c1 100644 --- a/test-plans/java-maven.yaml +++ b/test-plans/java-maven.yaml @@ -4,7 +4,7 @@ # Verify: Open Maven project → LS ready → basic editing experience (diagnostics, completion, Code Action) # # Prerequisites: -# - vscode-java repository cloned locally +# - vscode-java repo cloned locally # - JDK installed and available # - Maven installed # @@ -14,7 +14,7 @@ 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. + and verify basic editing experience including diagnostics, code completion, and Code Action. setup: extension: "redhat.java" @@ -26,17 +26,22 @@ setup: 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 to verify editing experience ───────────────── + # ── 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 opened in the editor" + verify: "Foo.java file is open in the editor" timeout: 10 # 2b. Verify code completion @@ -64,12 +69,3 @@ steps: - 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 index c61c6e53..6b15989d 100644 --- a/test-plans/java-new-file-snippet.yaml +++ b/test-plans/java-new-file-snippet.yaml @@ -4,7 +4,7 @@ # Verify: Right-click in Explorer to create Java file → auto-generated class snippet # # Prerequisites: -# - vscode-java repository cloned locally +# - vscode-java repo cloned locally # - JDK installed and available # # Usage: autotest run test-plans/java-new-file-snippet.yaml @@ -12,8 +12,8 @@ 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. + Create a new Java file via the file explorer, + and verify that a class code snippet is auto-generated. setup: extension: "redhat.java" @@ -33,16 +33,16 @@ steps: # ── 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) + # 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 ───────────────────────────────────── + # ── 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" + verify: "Hello.java is open" timeout: 10 - id: "verify-content" diff --git a/test-plans/java-single-file.yaml b/test-plans/java-single-file.yaml index fc136557..3ce3edca 100644 --- a/test-plans/java-single-file.yaml +++ b/test-plans/java-single-file.yaml @@ -12,7 +12,7 @@ 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. + and verify editing experience including snippets, diagnostics, and completion works correctly. setup: extension: "redhat.java" @@ -20,7 +20,7 @@ setup: - "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 + # The framework will automatically copy to a temp directory workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app" timeout: 60 @@ -36,19 +36,19 @@ steps: # ── Step 2: Open Java file ────────────────────────────── - id: "open-app" action: "open file App.java" - verify: "App.java file is opened in the editor" + verify: "App.java file is open in the editor" timeout: 10 - # ── Step 3: Verify code completion ──────────────────────────── + # ── 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" + action: "triggerCompletionAt endOfMethod" verify: "Code completion list appears" verifyCompletion: notEmpty: true - # ── Step 4: Verify basic editing ──────────────────────────── + # ── Step 4: Verify basic editing ──────────────────────────────── - id: "goto-main" action: "goToLine 6" verify: "Cursor moved to main method" diff --git a/test-plans/java-single-no-workspace.yaml b/test-plans/java-single-no-workspace.yaml index 38b19412..a085c8fe 100644 --- a/test-plans/java-single-no-workspace.yaml +++ b/test-plans/java-single-no-workspace.yaml @@ -4,15 +4,15 @@ # Verify: Open a single Java file without workspace → LS ready → editing experience works # # Prerequisites: -# - vscode-java repository cloned locally +# - 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 — No Workspace Single File" +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 workspace mode, + Directly open a Java file without a workspace, verify LS works normally and basic editing features are available. setup: @@ -20,7 +20,7 @@ setup: extensions: - "vscjava.vscode-java-pack" vscodeVersion: "stable" - # Single file mode — no workspace set, only open a file + # Single file mode — no workspace, just open one file file: "../../vscode-java/test/resources/projects/eclipse/simple-app/src/app/App.java" timeout: 60 @@ -32,22 +32,25 @@ steps: verify: "Status bar shows Java language server is ready" timeout: 120 - # ── Step 2: Verify file is opened ────────────────────────── + # ── Step 2: Verify file is open ────────────────────────────── - id: "verify-file-open" action: "wait 3 seconds" - verify: "App.java is opened" + 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: "triggerCompletion" + action: "triggerCompletionAt endOfMethod" verify: "Code completion works correctly" verifyCompletion: notEmpty: true + waitBefore: 5 + timeout: 30 - # ── Step 4: Verify editing ──────────────────────────────── + # ── 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 ad5a50db..7a7883af 100644 --- a/test-plans/java-test-runner.yaml +++ b/test-plans/java-test-runner.yaml @@ -6,7 +6,7 @@ # Uses maven/salut project (contains compilable Java source files) # # Prerequisites: -# - vscode-java repository cloned locally +# - vscode-java repo cloned locally # - JDK installed and available # # Usage: autotest run test-plans/java-test-runner.yaml @@ -14,7 +14,7 @@ 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. + Verify that the test panel displays test cases and tests can be run via the panel or CodeLens. setup: extension: "redhat.java" @@ -31,29 +31,26 @@ steps: verify: "Status bar shows Java language server is ready" timeout: 120 - # ── Step 1: Open test panel ───────────────────────────────── - # wiki: "The test explorer can show test case." + # ── Step 1: Open test explorer ───────────────────────────── - id: "open-test-explorer" action: "openTestExplorer" - verify: "Test panel is opened, test case list is visible" + verify: "Test explorer panel opened" - # ── Step 2: Run all tests ───────────────────────────────── - # wiki: "Can run the test cases by clicking Run All in test explorer" + # ── Step 2: Run all tests ────────────────────────────────── - id: "run-all-tests" action: "runAllTests" - verify: "Tests start running" + verify: "Tests started running" - id: "wait-test-complete" - action: "wait 30 seconds" - verify: "Test run completed" + action: "wait 60 seconds" + verify: "Test execution completed" - # ── Step 3: Open test file to verify CodeLens ──────────────────── - # wiki: "Open a Java test file, the Code Lens could show above each test cases" + # ── Step 3: Open test file and verify CodeLens ────────────── - id: "open-test-file" action: "open file Foo.java" - verify: "Test file is opened" + verify: "Test file opened" timeout: 10 - id: "verify-codelens" action: "wait 5 seconds" - verify: "CodeLens appears above test cases (Run Test / Debug Test)" + verify: "CodeLens visible above test cases (Run Test / Debug Test)"