Files
openidea/plugins/official/test-runner
l0ng-ai 2b80c75317 refactor(plugins): run only programs in plugin run targets (#2490)
Plugin run targets keep running programs, tests and package scripts inside
the target. Language servers and debuggers run on the host again:

- Remove the Language server targets settings page, the project-only
  `languageServerTargets` setting and the PHP / Node.js "Language server:
  run in target" option.
- Remove debugging through plugin targets; Debug on a plugin target is
  refused again. PHP Remote Debug and Python remote configurations with a
  path mapping debug programs in containers.
- Remove LSP / DAP message path mapping, read-only container documents and
  the `ide-core` path-mapping module that only these used.
- Run-target validation (API 1.5, unreleased) no longer has a `debug`
  operation, and debug start no longer takes a request id.
2026-11-10 15:27:31 +08:00
..

test-runner — API 1.4 example

Put this directory on PATH before installing/granting the plugin, so process:openidea-example-tests resolves to the included executable. Copy example.tests to a trusted project. Its presence enables the dynamic run-configurations export. Open it as plain text and click a gutter run button, or use Example: Run Tests / the Run selector for all tests.

The gutter command appends the test name as a filter to run.start. The fake executable prints a deliberately tiny start NAME / pass NAME protocol; test-results.parse retains split lines and emits stable test ids. Replace that protocol/parser and executable to integrate a real framework. This is an API example for integrating a test framework.

Build from the repository root:

plugins/build.sh official/test-runner
cargo test --manifest-path plugins/official/test-runner/Cargo.toml
cargo run -p ide-host --bin openidea-plugin -- check plugins/official/test-runner

Install the built package folder through Settings › Plugins › Install from Disk. See the plugin guide and official/community policy.

test-results.select-tests returns the selected names as the complete argv for openidea-example-tests, enabling Rerun Failed Tests and Run from the test tree. It returns None for unknown configurations or paths this example cannot filter.