You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 45b3d2a
Browse filesBrowse the repository at this point in the historyBrowse files
# ── Verify breakpoint hit ───────────────────────────────
70
-
# wiki: "verify if the breakpoint is hit". The deterministic ground
71
-
# truth is the next step `debugStepOver` — it can only succeed if the
72
-
# debugger is paused. The verify text is intentionally lenient: the
73
-
# yellow execution-line marker can be off-viewport when the debug
74
-
# toolbar pushes the editor down, so we accept either the marker or
75
-
# the debug toolbar in paused state as evidence.
76
-
- id: "verify-breakpoint"
76
+
# Allow the program to reach the breakpoint. The next debugStepOver action
77
+
# deterministically fails if the debug session already exited.
78
+
- id: "wait-for-breakpoint"
77
79
action: "wait 10 seconds"
78
-
verify: "Program is paused at the breakpoint — debug toolbar visible in paused state or the yellow execution-line marker appears on/near App.java line 5"
# owned by this repo. Upstream `vscode-java/maven/salut` has no @Test files,
@@ -13,10 +13,10 @@
13
13
#
14
14
# Usage: autotest run test-plans/java-test-runner.yaml
15
15
16
-
name: "Java Test Runner — Test Panel and CodeLens"
16
+
name: "Java Test Runner — Discovery and Execution"
17
17
description: |
18
18
Corresponds to the Java Test Runner scenario in the wiki Test Plan:
19
-
Verify that the test panel displays test cases and tests can be run via the panel or CodeLens.
19
+
Verify that Java tests are discovered and actually executed.
20
20
21
21
setup:
22
22
extension: "redhat.java"
@@ -25,12 +25,6 @@ setup:
25
25
vscodeVersion: "stable"
26
26
workspace: "../test-fixtures/maven-junit"
27
27
timeout: 360# First import needs to download JUnit jars on cold caches
28
-
# Force java.test.editor.enableCodelens=true so the Run|Debug CodeLens
29
-
# gutter links render reliably in the reopen-test-file verify screenshot.
30
-
# The vscode-java-test extension defaults to true but a stale user/Machine
31
-
# settings.json on the runner can override it.
32
-
workspaceSettings:
33
-
java.test.editor.enableCodelens: true
34
28
35
29
steps:
36
30
# ── Wait for LS ready ─────────────────────────────────────────
@@ -45,10 +39,19 @@ steps:
45
39
action: "open file CalculatorTest.java"
46
40
verify: "CalculatorTest.java is open in the editor and shows a JUnit @Test method"
47
41
verifyEditor:
42
+
fileName: "CalculatorTest.java"
48
43
contains: "@Test"
49
44
timeout: 15
50
45
waitBefore: 5
51
46
47
+
- id: "clear-execution-marker"
48
+
action: "deleteFile target/autotest-executed.txt"
49
+
verify: "Any execution marker from an earlier test run has been removed"
50
+
verifyFile:
51
+
path: "~/target/autotest-executed.txt"
52
+
exists: false
53
+
skipLlmVerify: true
54
+
52
55
# Give the Java Test Runner extension time to scan the project after LS
53
56
# ready — discovery is asynchronous and Test Explorer is initially empty.
54
57
# On cold-cache CI runners 20s is sometimes too short; bump to 45s.
@@ -63,39 +66,19 @@ steps:
63
66
# and runs every test in the project from any context (matches the wiki
64
67
# scenario "Run all tests").
65
68
#
66
-
# The verify text is intentionally agnostic to whether the run produced a
67
-
# results panel, an inline "No tests found" hint, or simply dismissed the
68
-
# palette — on a cold-cache runner the Java Test Runner's discovery may
69
-
# still be in flight when the screenshot is captured. The wait-test-complete
70
-
# step below provides the deterministic settle window before any further
71
-
# assertion is made.
72
69
- id: "run-all-tests"
73
70
action: "run command Java: Run Tests"
74
-
verify: "Java: Run Tests command has been invoked from the palette; the Java Test Runner extension has responded (this may show as a Testing view becoming active, a run indicator in the status bar, or an informational notification such as 'No tests found in this file' if discovery is still in progress — all of these indicate the command executed successfully)"
71
+
verify: "Java: Run Tests was selected and dispatched from the command palette"
75
72
waitBefore: 3
76
-
# Test discovery is asynchronous in vscode-java-test; on cold-cache
77
-
# CI runners the first Run Tests invocation can land before discovery
78
-
# completes ("No tests have been found"). Allow one retry — by the
79
-
# second attempt the discovery cache is usually warm.
80
-
retries: 1
73
+
skipLlmVerify: true
81
74
82
-
- id: "wait-test-complete"
75
+
# CalculatorTest writes this marker only after its assertion passes. Missing
76
+
# discovery, "No tests found", launch failures, and failed tests therefore
77
+
# cannot pass this deterministic verification.
78
+
- id: "verify-run-all-executed"
83
79
action: "wait 45 seconds"
84
-
verify: "Test discovery / execution has settled after the wait; the editor still shows CalculatorTest.java with the @Test method"
85
-
86
-
# ── Step 3: Re-open test file ──────────
87
-
# The @Test annotation in the editor's text content is the deterministic
88
-
# ground truth that the test file is loaded and visible. CodeLens
89
-
# (Run|Debug) gutter links require the vscode-java-test extension to
90
-
# have completed its discovery scan; on a cold runner with newly-
91
-
# downloaded JUnit jars they may not be rendered at screenshot time.
92
-
# Keep verify text strictly about visible editor content so the LLM
93
-
# doesn't downgrade on the CodeLens absence.
94
-
- id: "reopen-test-file"
95
-
action: "open file CalculatorTest.java"
96
-
verify: "CalculatorTest.java is re-opened in the editor; the file's content is shown including the @Test-annotated method"
97
-
verifyEditor:
98
-
contains: "@Test"
99
-
timeout: 10
100
-
waitBefore: 5
101
-
80
+
verify: "CalculatorTest.testAdd completed successfully and wrote its execution marker"
0 commit comments