Skip to content

Commit 0e97cd4

Browse files
committed
Update webstudio test results view for cli results
1 parent ebb0d7f commit 0e97cd4

24 files changed

Lines changed: 452 additions & 68 deletions

File tree

agent/resources/skills/testar-cli/SKILL.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ Use double quotes around target, text, and value when they contain spaces or spe
8181
6. Stop the session when the goal is finished.
8282
7. Shutdown the daemon after stopping the session.
8383

84+
After executing one or multiple test goal sessions, always run:
85+
86+
- `shutdownDaemon`
87+
88+
Do this after the final `stopSession ...` command so no daemon or SUT-driver process remains active.
89+
8490
## Test goal verdicts
8591

8692
Agent CLI executions must finish each test goal with exactly one explicit verdict command:

cli/src/org/testar/cli/CliDaemonServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ private OperatingSystems parseOperatingSystem(String token) {
533533
List<Verdict> finalVerdictsFromStopRequest(CliRequest request) {
534534
String verdictName = request.argumentAt(0);
535535
if (verdictName == null || verdictName.isBlank()) {
536-
return List.of(Verdict.OK);
536+
return List.of(new Verdict(Verdict.Severity.LLM_COMPLETE, "Manual CLI session completed."));
537537
}
538538

539539
Verdict.Severity severity = parseFinalVerdictSeverity(verdictName);

cli/test/org/testar/cli/CliDaemonServerTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,16 @@ public void resolveCliTargetRejectsDesktopAttachConnector() {
143143
}
144144

145145
@Test
146-
public void stopSessionWithoutVerdictDefaultsToOk() {
146+
public void stopSessionWithoutVerdictDefaultsToLlmComplete() {
147147
CliDaemonServer server = new CliDaemonServer();
148148

149149
List<Verdict> verdicts = server.finalVerdictsFromStopRequest(
150150
CliRequest.of(CliCommand.STOP_SESSION, List.of())
151151
);
152152

153153
Assert.assertEquals(1, verdicts.size());
154-
Assert.assertEquals(Verdict.OK, verdicts.get(0));
154+
Assert.assertEquals(Verdict.Severity.LLM_COMPLETE.getValue(), verdicts.get(0).severity(), 0.0);
155+
Assert.assertEquals("Manual CLI session completed.", verdicts.get(0).info());
155156
}
156157

157158
@Test

docs/architecture_distribution_workspace.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Manual CLI execution may use:
154154
stopSession
155155
```
156156

157-
Plain `stopSession` defaults the final session verdict to `OK`.
157+
Plain `stopSession` defaults the final session verdict to `LLM_COMPLETE` and is intended for manual CLI sessions.
158158

159159
Agent CLI execution must finish each test goal with an explicit LLM verdict:
160160

@@ -173,6 +173,17 @@ If reporting is enabled, the final CLI verdict must be written to the generated
173173

174174
The `testar-cli` skill documentation is the operational source that tells agents how to use this contract.
175175

176+
## Output Folder Naming
177+
178+
Generated output folders must include the execution mode after the timestamp.
179+
180+
Examples:
181+
182+
- `2026-06-29_13h23m23s_generate_webdriver_parabank_1`
183+
- `2026-06-29_13h23m23s_cli_webdriver_parabank_1`
184+
185+
The mode token allows WebStudio to present mode-specific result summaries while keeping one shared output folder.
186+
176187
## Shared Settings
177188

178189
The same `test.settings` file can contain settings used by different modes.

docs/webstudio/WEBSTUDIO_BUG_BACKLOG.md

Lines changed: 75 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ Each bug entry should contain:
1111
- bug behavior
1212
- status
1313

14-
## List of Bugs
14+
## Archived bugs
15+
16+
Bugs fixed during previous designs that no longer map to current UI concepts.
1517

1618
### WS-001 CLI Buttons Not Recomputed After Workspace Change
1719

@@ -36,6 +38,36 @@ Acceptance:
3638

3739
- CLI availability recomputes immediately when workspace changes
3840

41+
### WS-008 View State Model Did Nothing For Unsupported Workspace
42+
43+
- Area: Navigation / State Model Analysis
44+
- Status: archived after shared runtime refactor
45+
46+
Reproduction:
47+
48+
1. Select a workspace that is not available in either the TESTAR runtime or the CLI runtime.
49+
2. Click `View State Model`.
50+
51+
Expected:
52+
53+
- WebStudio shows a user-facing dialog explaining why state model analysis cannot be opened for the selected workspace
54+
55+
Bug:
56+
57+
- the button action returned silently when the selected workspace was not available in the TESTAR runtime workspace list
58+
- the check was too strict because CLI workspaces can also generate state models
59+
60+
Reason archived:
61+
62+
- WebStudio now uses the selected shared workspace/runtime model
63+
- the separate TESTAR-vs-CLI runtime availability concept no longer maps to the current State Model flow
64+
- current expected behavior is specified in `WEBSTUDIO_FUNCTIONAL_SPEC.md`
65+
- current dialog behavior remains covered by `stateModelNavigation.test.js`
66+
67+
## List of Bugs
68+
69+
Bugs fixed which are still relevant to current designs or behaviors.
70+
3971
### WS-002 Runtime Pages Missing SUT Target Summary
4072

4173
- Area: Generate Mode / Spy Mode
@@ -196,30 +228,59 @@ Acceptance:
196228
- optional non-dropdown string settings can still render a blank option
197229
- regression test `settingsSelectOptions.test.js` passes
198230

199-
### WS-008 View State Model Did Nothing For Unsupported Workspace
231+
### WS-009 Generate And Spy Buttons Disabled By Stale Runtime-Origin Gate
200232

201-
- Area: Navigation / State Model Analysis
233+
- Area: Generate Mode / Spy Mode
202234
- Status: fixed
203235

204236
Reproduction:
205237

206-
1. Select a workspace that is not available in either the TESTAR runtime or the CLI runtime.
207-
2. Click `View State Model`.
238+
1. Select a workspace after the shared runtime/workspace refactor.
239+
2. Open Generate Mode or Spy Mode.
240+
3. Observe the run buttons.
208241

209242
Expected:
210243

211-
- WebStudio shows a user-facing dialog explaining why state model analysis cannot be opened for the selected workspace
244+
- Generate and Spy start buttons enable when a workspace is selected and no execution is already running
245+
- workspace origin metadata must not disable scriptless runtime controls
212246

213247
Bug:
214248

215-
- the button action returned silently when the selected workspace was not available in the TESTAR runtime workspace list
216-
- the check was too strict because CLI workspaces can also generate state models
249+
- Generate and Spy still required `availableInTestar`
250+
- workspaces not marked with that old TESTAR-only flag left the buttons disabled
251+
252+
Acceptance:
253+
254+
- Generate and Spy buttons use selected shared workspace availability
255+
- no selected workspace still disables the buttons
256+
- saving or active execution still disables the buttons
257+
- regression test `runtimeModeControls.test.js` passes
258+
259+
### WS-010 LLM Complete Results Shown As Issues
260+
261+
- Area: Test Results / CLI Reports
262+
- Status: fixed
263+
264+
Reproduction:
265+
266+
1. Run an Agent CLI execution that finishes with `LLM_COMPLETE`.
267+
2. Open `View Test Results`.
268+
3. Inspect `Output Results`, `Test Verdict Files`, and success/issue filters.
269+
270+
Expected:
271+
272+
- `LLM_COMPLETE` result files are successful outcomes
273+
- output folders containing only `LLM_COMPLETE` files are successful
274+
- `Successful only` includes `LLM_COMPLETE`
275+
- `Issues only` excludes `LLM_COMPLETE`
276+
277+
Bug:
278+
279+
- shared result listing still treated only `OK` as successful
280+
- `LLM_COMPLETE` files were marked as failed, causing red rows and incorrect filters
217281

218282
Acceptance:
219283

220-
- incompatible workspaces show an `Unable To Open State Model` dialog
221-
- missing workspace selection shows an `Unable To Open State Model` dialog
222-
- TESTAR-compatible workspaces continue to call the state model open API
223-
- CLI-compatible workspaces continue to call the state model open API
224-
- state model analysis resolves datastore paths against the selected workspace runtime home
225-
- regression test `stateModelNavigation.test.js` passes
284+
- shared result status classification treats `OK` and `LLM_COMPLETE` as successful
285+
- `LLM_INVALID` and non-success verdicts remain issue outcomes
286+
- regression test `ResultVerdictStatusTest` passes

docs/webstudio/WEBSTUDIO_FUNCTIONAL_SPEC.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ Header information:
307307

308308
Runtime behavior:
309309

310+
- run controls are enabled when a shared workspace is selected and no Generate execution is already running
310311
- start calls the server execution endpoint for scriptless generate
311312
- stop calls the scriptless stop endpoint
312313
- polling updates console output and sequence outcomes
@@ -321,6 +322,8 @@ Spy Mode supports:
321322
- widget hover and selection
322323
- derived/default/direct actions on widgets
323324

325+
Run controls are enabled when a shared workspace is selected and no Spy execution is already running.
326+
324327
Header information:
325328

326329
- current `SUTConnectorValue`
@@ -364,7 +367,7 @@ Dialog actions:
364367

365368
Manual CLI execution may stop a session with plain `stopSession`.
366369

367-
Plain `stopSession` must finalize the session with an `OK` verdict.
370+
Plain `stopSession` must finalize the session with an `LLM_COMPLETE` verdict.
368371

369372
Agent CLI execution must stop a session with an explicit LLM verdict:
370373

@@ -385,13 +388,24 @@ When CLI reporting is enabled, generated report artifacts must include the final
385388

386389
The Test Results page supports inspection of output folders from the shared TESTAR distribution.
387390

391+
Output result folder names must include the execution mode token after the timestamp:
392+
393+
- `generate` for scriptless Generate mode
394+
- `cli` for CLI mode
395+
396+
Example names:
397+
398+
- `2026-06-29_13h23m23s_generate_webdriver_parabank_1`
399+
- `2026-06-29_13h23m23s_cli_webdriver_parabank_1`
400+
388401
### Output Result Selection
389402

390403
The page must support:
391404

392405
- output result folder selection
393-
- output result folder sorting
394-
- output result folder filtering
406+
- output result folder sorting by date or name
407+
- output result folder filtering by result type
408+
- output result folder filtering by execution mode
395409
- generated file listing for the selected output folder
396410
- generated file filtering
397411
- verdict outcome summarization
@@ -415,6 +429,18 @@ The summary should include:
415429
- sequence status overview
416430
- enough metadata to understand which run is selected
417431

432+
Generate output summaries use `OK` and `FAILED` labels.
433+
434+
`OK` result files are successful outcomes.
435+
436+
`FAILED` result files are issue outcomes.
437+
438+
CLI output summaries use `COMPLETED` and `INVALID` labels.
439+
440+
`LLM_COMPLETE` result files are successful outcomes.
441+
442+
`LLM_INVALID` result files are issue outcomes.
443+
418444
When a generated file is selected, the right preview area must show the corresponding HTML report.
419445

420446
The user must be able to return from the HTML report preview to the run-level verdict outcome summary.
@@ -442,14 +468,17 @@ Expected empty-state behavior:
442468
Output result folder filtering should support:
443469

444470
- all folders
445-
- folders with failures
446-
- folders with only OK sequences
471+
- folders with issues
472+
- folders with only successful sequences
473+
- all execution modes
474+
- Generate execution mode
475+
- CLI execution mode
447476

448477
Generated file filtering should support:
449478

450479
- all files
451-
- failed files
452-
- OK files
480+
- issue files
481+
- successful files
453482

454483
Filtering must not delete files. It only changes visibility in Web Studio.
455484

docs/webstudio/WEBSTUDIO_UX_SPEC.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,13 @@ Expected behavior:
239239

240240
- the left panel contains `Output Results`
241241
- `Output Results` reads from the shared Generate and CLI output folder
242-
- `Output Results` includes sorting and filtering controls
242+
- `Output Results` includes sorting by date or name
243+
- `Output Results` includes filtering by the result type
244+
- `Output Results` can be filtered by execution mode: All, Generate, or CLI
243245
- the left panel also contains `Generated Files` for the selected output result
244246
- selecting an output result folder shows a run-level verdict outcome summary in the right preview area
247+
- Generate summaries use `OK` and `FAILED` wording
248+
- CLI summaries use `COMPLETED` and `INVALID` wording
245249
- selecting an output result folder does not automatically select the first generated file
246250
- selecting a generated file replaces the summary with the HTML report preview
247251
- the user can return from HTML report preview to the run-level verdict outcome summary

plugin/src/org/testar/plugin/reporting/SessionReportingManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ private static void configureOutputStructure(Settings settings, String target) {
208208
OutputStructure.executedSUTname = sanitizeTarget(target);
209209
}
210210

211+
OutputStructure.setExecutionModeName("cli");
211212
OutputStructure.createOutputFolders();
212213
}
213214

reporting/src/org/testar/OutputStructure.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ private OutputStructure() { }
2525
public static String startInnerLoopDateString;
2626

2727
public static String executedSUTname;
28+
public static String executionModeName = "";
2829
public static int sequenceInnerLoopCount;
2930

3031
public static String outerLoopOutputDir;
@@ -93,9 +94,18 @@ public static void createOutputSUTname(Settings settings) {
9394
}
9495
}
9596

97+
public static void setExecutionModeName(String modeName) {
98+
executionModeName = sanitizeOutputName(modeName);
99+
}
100+
96101
public static void createOutputFolders() {
102+
String outputName = executedSUTname;
103+
if (executionModeName != null && !executionModeName.isEmpty()) {
104+
outputName = executionModeName + "_" + outputName;
105+
}
106+
97107
outerLoopOutputDir = TestarDirectories.getOutputDir() + File.separator + startOuterLoopDateString
98-
+ "_" + executedSUTname;
108+
+ "_" + outputName;
99109
File runDir = new File(outerLoopOutputDir);
100110
runDir.mkdirs();
101111

@@ -141,6 +151,10 @@ public static void createOutputFolders() {
141151
}
142152
}
143153

154+
private static String sanitizeOutputName(String name) {
155+
return name == null ? "" : name.trim().replaceAll("[^A-Za-z0-9_-]", "_");
156+
}
157+
144158
private static void reportDirectoryCreationFailure(String purpose, File directory) {
145159
File parent = directory.getParentFile();
146160
Path cwd = Paths.get(".").toAbsolutePath().normalize();

0 commit comments

Comments
 (0)