Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ The plugin currently focuses on:
* bundled OFT live templates for common specification items, including a scenario template
* project-wide or selected-resource OFT tracing from `Tools | OpenFastTrace | Trace Project` or through custom OpenFastTrace run configurations
* clickable specification item IDs directly from the trace output window, including generated IDs created from coverage tags
* IntelliJ Test Runner UI output for OpenFastTrace traces by default, grouped by source file, specification item, and trace link
* quick access to the OpenFastTrace user guide from the IDE help menu

For expected behavior and scope details, see:
Expand All @@ -71,13 +72,19 @@ For manual IDE testing, launch a sandbox IDE with the plugin:
./gradlew manualTestIde
```

## Using the Plugin

After the sandbox IDE opens a project, configure trace scope under `Settings | Tools | OpenFastTrace`. By default, `Trace Project` scans the whole opened project. If you switch to selected-resource tracing, the plugin includes IntelliJ source roots, IntelliJ test roots, and one default additional project-relative path entry, `doc/`, until you change it. Additional files or directories are entered one per line.

Run an OFT trace from `Tools | OpenFastTrace | Trace Project`, use the default shortcut `Ctrl+Alt+Shift+O`, or create and run a dedicated `OpenFastTrace` run configuration from the IDE's run/debug toolbar. The plugin traces the configured inputs in the background and shows the plain text result in an IDE output tab with ANSI colors preserved. You can click specification item IDs in the report to jump to their declarations, including source-side items generated from coverage tags.
## Run Configurations

The plugin also bundles an `OpenFastTrace` live-template group under `Settings | Editor | Live Templates`. Use abbreviations such as `feat`, `req`, `dsn`, and `scn` in a supported editing context, then press `Tab` to insert an OFT item skeleton. The `scn` template inserts a scenario stub with placeholders for `Given`, `When`, `Then`, and the covered requirement. While the caret is still in a template's covered-item field, use basic completion to select an existing specification item ID from the project index.
You can create and run a dedicated `OpenFastTrace` run configuration from the IDE's run/debug toolbar. The plugin traces the configured inputs in the background and shows the result in IntelliJ's Test Runner UI by default. The result tree groups source files, specification items, and trace links with pass/fail status and navigation back to source.

When editing a `Covers:` section in a supported specification document, invoke basic completion on a partial specification item ID to get existing declarations from the project index. The same completion is available on the target side of likely coverage tags in files supported by the OpenFastTrace Tag Importer after the left-hand artifact type and arrow, for example `// [impl->dsn~partial]`. Suggestions prefer full-ID prefix matches first, then name-prefix matches, then name-substring matches, and finally artifact-type prefix matches.
Run configurations can select plain text output instead. In that mode, the plugin shows the text report in an IDE output tab with ANSI colors preserved. You can click specification item IDs in the report to jump to their declarations, including source-side items generated from coverage tags.

## Live-Templates Bundled With the Plugin

The plugin also bundles an `OpenFastTrace` live-template group under `Settings | Editor | Live Templates`. Use abbreviations such as `feat`, `req`, `dsn`, and `scn` in a supported editing context, then press `Tab` to insert an OFT item skeleton. The `scn` template inserts a scenario stub with placeholders for `Given`, `When`, `Then`, and the covered requirement. While the caret is still in a template's covered-item field, use basic completion to select an existing specification item ID from the project index.

## Installation
### Runtime Dependencies
Expand Down
1 change: 1 addition & 0 deletions doc/changes/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changelog

* [0.8.0](changes_0.8.0.md)
* [0.7.0](changes_0.7.0.md)
* [0.6.0](changes_0.6.0.md)
* [0.5.2](changes_0.5.2.md)
Expand Down
19 changes: 19 additions & 0 deletions doc/changes/changes_0.8.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# OpenFastTrace IntelliJ Plugin 0.8.0, released 2026-06-09

Version 0.7.0 made OpenFastTrace runs configurable, so you could trace only the files, artifact types, or tags that matter for a specific task. Version 0.8.0 makes those trace results much easier to understand and act on.

OpenFastTrace traces now open in IntelliJ's built-in Test Runner UI by default. Instead of scanning a plain text report, you get a structured result tree that groups findings by source file, specification item, and trace link. Clean items show as passed tests, trace defects show as failed tests, and failed source files and the top-level trace result are marked automatically.

This gives you a faster trace review workflow:

* see immediately whether the trace passed or where defects remain
* expand a source file to inspect the affected specification items
* inspect incoming and outgoing trace links as sub-tests
* read item IDs, link status, and defect explanations in the test details
* navigate from result nodes back to source files, specification declarations, and source-side coverage tags

The global `Tools | OpenFastTrace | Trace Project` action and new or previously unconfigured run configurations use the Test Runner UI. Run configurations can still opt into the existing plain text output when you want the raw OpenFastTrace report.

## Features

#40: Integrate OFT Trace into Test Runner UI
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The likely fault line is the OpenFastTrace library's use of `ServiceLoader` for

### Requirements And Design

- [x] Confirm that GH-17 is fully covered by the existing `feat~run-oft-trace~1`, `req~trace-open-project-from-project-root~1`, `req~show-trace-output-in-ide-output-window~1`, and related trace scenarios, so no user-facing requirement changes are needed
- [x] Confirm that GH-17 is fully covered by the existing `feat~run-oft-trace~2`, `req~trace-open-project-from-project-root~1`, `req~show-trace-output-in-ide-output-window~2`, and related trace scenarios, so no user-facing requirement changes are needed
- [x] Update the design documentation to record the OFT importer/reporter discovery constraint in the plugin runtime, including that trace execution must use the plugin class loader for `ServiceLoader`-based OFT extension lookup
- [x] Link the design clarification to the existing trace-execution design items instead of introducing redundant new runtime requirements

Expand Down
92 changes: 52 additions & 40 deletions doc/changesets/40-integrate-oft-trace-into-test-runner-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@

Let users run an OpenFastTrace run configuration and inspect the structured trace result in IntelliJ's built-in test runner UI instead of only reading the plain text trace output.

The implementation should preserve the existing plain text output as the default result view while adding a run-configuration option that presents trace results as source-file suites, specification-item tests, and trace-link sub-tests with pass/fail status and navigation back to the source.
The implementation originally preserved the existing plain text output as the default result view while adding a run-configuration option that presents trace results as source-file suites, specification-item tests, and trace-link sub-tests with pass/fail status and navigation back to the source. The follow-up changeset [Default Test Runner Trace Result View](default-test-runner-trace-result-view.md) changes that default to the IntelliJ Test Runner UI.

## Scope

In scope:

* Add a result-view option to the `OpenFastTrace` run configuration editor for plain text output or IntelliJ test runner output.
* Preserve the existing plain text output behavior for `Tools | OpenFastTrace | Trace Project` and for run configurations unless the user selects the test runner view.
* Preserve the existing plain text output behavior for run configurations that select the plain text result view.
* Keep the structured `Trace` object produced by `OftTraceService` available to output presenters.
* Implement an `OftTraceOutputPresenter` that feeds trace results into `SMTRunnerConsoleView`.
* Build the test runner hierarchy by source file, specification item, and incoming or outgoing trace link.
* Map clean specification items and links to passed tests and defective items or links to failed tests.
* Show item and link status labels in brackets, for example `(covered)` and `(orphaned)`.
* Show item and link status labels in brackets only for non-clean statuses, for example `(uncovered)` and `(orphaned)`.
* Keep tree labels compact by showing item titles when available and moving IDs to node details.
* Mark links as incoming or outgoing as required by GH-40.
* Reuse `OftTraceNavigationResolver` so test runner nodes can navigate to specification declarations and source-side coverage tags.
* Reuse `OftTraceNavigationResolver` so test runner nodes can navigate to source files, specification declarations, and source-side coverage tags.

Out of scope:

Expand Down Expand Up @@ -46,64 +47,75 @@ Keep presentation selection at the run-configuration layer. The global `Trace Pr

## Task List

- [ ] Create and checkout a new Git branch `feat/40-integrate-oft-trace-into-test-runner-ui`
- [x] Create and checkout a new Git branch `feat/40-integrate-oft-trace-into-test-runner-ui`

### Requirements And Design

- [x] Update `doc/system_requirements.md` with a user requirement for selecting the trace result view in an `OpenFastTrace` run configuration.
- [x] Add system scenarios for showing trace results in the test runner by source file, specification item, and trace link.
- [x] Add system scenarios for test-runner pass/fail mapping, bracketed status labels, incoming/outgoing link markers, and navigation from result nodes to source.
- [x] Add system scenarios for test-runner pass/fail mapping, non-clean status labels, incoming/outgoing link markers, and navigation from result nodes to source.
- [x] Add system requirements and scenarios for source-file suite roll-up, top-level trace roll-up, Unicode direction arrows, and node defect details.
- [x] Add system requirements and scenarios for title-aware compact specification item labels, ID details, and deterministic per-file item ordering.
- [x] Keep the existing plain text trace-output requirements and scenarios valid for the global `Trace Project` action and default run-configuration behavior.
- [x] Stop and ask user for a review of the system requirements.
- [x] Update `doc/design/solution_strategy.md` to document reuse of IntelliJ's SM test runner infrastructure for structured trace result presentation.
- [x] Update `doc/design/building_block_view.md` with a test-runner trace presentation building block and the run-configuration result-view option.
- [x] Update `doc/design/runtime_view.md` with design items for presenter selection, test-runner hierarchy construction, status mapping, and navigation.
- [ ] Stop and ask user for a review of the design.
- [x] Update the design with suite roll-up behavior, Unicode direction markers, and static trace-link defect detail templates.
- [x] Update the design with title-aware compact item labels, ID details, and source-file suite item ordering.
- [x] Stop and ask user for a review of the design.

### Implementation

- [ ] Add a run-configuration presentation mode, defaulting existing configurations to plain text output.
- [ ] Extend `OftRunConfiguration` persistence and `OftRunConfigurationSettingsEditor` so users can choose plain text output or test runner output.
- [ ] Update `OftRunProfileState` to select `OftTraceRunContentOutputPresenter` or the new test-runner presenter from the saved presentation mode.
- [ ] Keep `OftTraceProjectAction` wired to the existing plain text presenter.
- [ ] Extend `OftTraceResult` so successful and defective trace runs retain the structured `Trace` in addition to the rendered text report.
- [ ] Update `OftTraceService` to return structured trace data without changing importer, linker, tracer, class-loader, filter, or text-rendering behavior.
- [ ] Implement a trace-to-test-tree mapper that groups results by source file, creates specification-item test nodes, and creates incoming and outgoing link sub-test nodes.
- [ ] Implement status-label derivation for specification items and links from OpenFastTrace trace data.
- [ ] Implement pass/fail mapping for clean and defective specification items and links.
- [ ] Implement `OftTraceTestRunnerOutputPresenter` using `SMTRunnerConsoleView` and `SMTestProxy`.
- [ ] Connect test-runner node navigation through `OftTraceNavigationResolver`.
- [ ] Present invalid input, cancellation, and unexpected errors coherently when the test-runner output mode is selected.
- [ ] Preserve existing ANSI-colored plain text output and console hyperlink behavior.
- [ ] Avoid adding third-party dependencies unless a separate design decision is approved.
- [x] Add a run-configuration presentation mode, defaulting existing configurations to plain text output.
- [x] Extend `OftRunConfiguration` persistence and `OftRunConfigurationSettingsEditor` so users can choose plain text output or test runner output.
- [x] Update `OftRunProfileState` to select `OftTraceRunContentOutputPresenter` or the new test-runner presenter from the saved presentation mode.
- [x] Keep `OftTraceProjectAction` wired to the existing plain text presenter.
- [x] Extend `OftTraceResult` so successful and defective trace runs retain the structured `Trace` in addition to the rendered text report.
- [x] Update `OftTraceService` to return structured trace data without changing importer, linker, tracer, class-loader, filter, or text-rendering behavior.
- [x] Implement a trace-to-test-tree mapper that groups results by source file, creates specification-item test nodes, and creates incoming and outgoing link sub-test nodes.
- [x] Implement non-clean status-label derivation for specification items and links from OpenFastTrace trace data.
- [x] Implement pass/fail mapping for clean and defective specification items and links.
- [x] Implement `OftTraceTestRunnerOutputPresenter` using `SMTRunnerConsoleView` and `SMTestProxy`.
- [x] Roll failed descendants up to source-file suites and the top-level trace suite.
- [x] Replace ASCII trace-link direction markers with Unicode arrows.
- [x] Add clear node details for specification items and trace links, using static templates for failed link-status explanations.
- [x] Display compact specification item titles when available, keep IDs in details, and sort item entries per source file by artifact type, ID name, and revision.
- [x] Connect test-runner node navigation through `OftTraceNavigationResolver`.
- [x] Let source-file suite nodes navigate to their corresponding file.
- [x] Present invalid input, cancellation, and unexpected errors coherently when the test-runner output mode is selected.
- [x] Preserve existing ANSI-colored plain text output and console hyperlink behavior.
- [x] Avoid adding third-party dependencies unless a separate design decision is approved.

### Verification

- [ ] Add tests for run-configuration presentation-mode defaults, persistence, and backward-compatible XML reading.
- [ ] Add settings-editor tests for selecting and applying the result-view option.
- [ ] Add `OftTraceResult` and `OftTraceService` tests proving structured `Trace` data is retained for clean and defective runs and absent for invalid-input, cancelled, and unexpected-error results.
- [ ] Add focused mapper tests for source-file grouping, specification-item nodes, incoming/outgoing link nodes, bracketed status labels, and pass/fail status.
- [ ] Add presenter tests for `SMTRunnerConsoleView` creation and event emission for successful and defective traces.
- [ ] Add run-profile tests proving plain text output remains the default and test-runner output is selected only when configured.
- [ ] Add navigation tests proving test-runner nodes navigate to specification declarations and source-side coverage tags through `OftTraceNavigationResolver`.
- [ ] Keep existing trace action, trace service, console presenter, run-configuration, and navigation tests green.
- [ ] Keep the OpenFastTrace trace clean for `feat`, `req`, `scn`, `dsn`, `impl`, `utest`, and `itest` artifacts in scope.
- [ ] Keep path coverage at or above the documented 80% threshold.
- [ ] Keep dependency policy unchanged and dependency verification compatible with the build.
- [ ] Run `./gradlew test`.
- [ ] Run `./gradlew check`.
- [ ] Run `./gradlew verifyPlugin`.
- [x] Add tests for run-configuration presentation-mode defaults, persistence, and backward-compatible XML reading.
- [x] Add settings-editor tests for selecting and applying the result-view option.
- [x] Add `OftTraceResult` and `OftTraceService` tests proving structured `Trace` data is retained for clean and defective runs and absent for invalid-input, cancelled, and unexpected-error results.
- [x] Add focused mapper tests for source-file grouping, specification-item nodes, incoming/outgoing link nodes, non-clean status labels, and pass/fail status.
- [x] Add presenter tests for `SMTRunnerConsoleView` creation and event emission for successful and defective traces.
- [x] Add mapper and presenter tests for suite roll-up, top-level roll-up, Unicode arrows, and failed-node details.
- [x] Add mapper and presenter tests for compact item labels, ID details, and per-file item ordering.
- [x] Add run-profile tests proving the configured result-view selection controls whether plain text or test-runner output is used.
- [x] Add navigation tests proving test-runner nodes navigate to specification declarations and source-side coverage tags through `OftTraceNavigationResolver`.
- [x] Keep existing trace action, trace service, console presenter, run-configuration, and navigation tests green.
- [x] Keep the OpenFastTrace trace clean for `feat`, `req`, `scn`, `dsn`, `impl`, `utest`, and `itest` artifacts in scope.
- [x] Keep path coverage at or above the documented 80% threshold.
- [x] Keep dependency policy unchanged and dependency verification compatible with the build.
- [x] Run `./gradlew test`.
- [x] Run `./gradlew check`.
- [x] Run `./gradlew verifyPlugin`.
- [ ] Keep the SonarQube Cloud quality gate green after CI analysis.

### Update user documentation

- [ ] Update `README.md` to describe selecting the test runner result view from an OpenFastTrace run configuration and using navigation from the structured result tree.
- [x] Update `README.md` to describe selecting the test runner result view from an OpenFastTrace run configuration and using navigation from the structured result tree.

## Version and Changelog Update

- [x] Check if the current version mentioned in the build scripts and code parameters is the same as the latest GitHub release. Current `gradle.properties` version is `0.7.0`; latest GitHub release is `0.7.0` as of 2026-06-09.
- [x] Decide if and which part of the version needs to be incremented. GH-40 is a feature, so the minor version needs to be incremented.
- [ ] Raise the version to `0.8.0` (this is a feature release).
- [ ] Write the changelog entry for `0.8.0`.
- [ ] Update release date to `2026-06-09`.
- [ ] Ensure that the issue list contains `#40: Integrate OFT Trace into Test Runner UI`.
- [x] Raise the version to `0.8.0` (this is a feature release).
- [x] Write the changelog entry for `0.8.0`.
- [x] Update release date to `2026-06-09`.
- [x] Ensure that the issue list contains `#40: Integrate OFT Trace into Test Runner UI`.
Loading
Loading