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
The IntelliJ plugin does not yet pass Robot Framework's -I / --parseinclude nor -N / --name options when running a test / task or a subset of tests. The VS Code extension already does. This is a parity gap — the IntelliJ platform support lags a bit behind the VS Code implementation.
Without these options, on Robot Framework 6.1+ a subset run parses the whole project instead of only the selected file(s), which can surface parse errors from unrelated files ("widening scope"). Implementing them brings the IntelliJ run behaviour in line with VS Code (see #624 for the VS Code side).
Only -bl (by-longname) is added per selected item — no -N, no -I.
Proposed
Mirror what the VS Code extension does in DebugManager.runTests
(vscode-client/extension/debugmanager.ts):
-N <topLevelSuiteName> — the discovered top-level suite name, so the -bl longnames computed at discovery time stay valid at run time (the runner's ByLongName modifier remaps them via --name).
-I <relSource> per selected source file — but only when the project's Robot Framework supports --parseinclude (RF ≥ 6.1).
profile.includedTestItems: List<RobotCodeTestItem> carries relSource and longname for each selected item.
The top-level suite name is reachable via project.testManger.testItems (the workspace item's first child's longname).
escapeRobotGlob(...) should be used for -I values (glob patterns), as in the discovery path.
Complication to investigate
The IntelliJ command is structured differently from VS Code's: it has no -- separator and no -d results. -N and -I are Robot options, so their placement/ordering relative to robotcode's own options (-bl) matters — a -- separator is very likely required so click does not mis-parse them. This needs to be worked out and verified.
Verification
Not covered by automated tests. Needs manual verification in the JetBrains sandbox IDE (./gradlew runIde) against a project that has a broken/incompatible .robot file next to a valid one, on RF ≥ 6.1:
Run a single test → the executed command must contain -I <relpath> and -N <rootname>, and no parse errors from the unrelated file appear.
Counter-check on RF < 6.1: no -I (the option does not exist there).
Summary
The IntelliJ plugin does not yet pass Robot Framework's
-I/--parseincludenor-N/--nameoptions when running a test / task or a subset of tests. The VS Code extension already does. This is a parity gap — the IntelliJ platform support lags a bit behind the VS Code implementation.Without these options, on Robot Framework 6.1+ a subset run parses the whole project instead of only the selected file(s), which can surface parse errors from unrelated files ("widening scope"). Implementing them brings the IntelliJ run behaviour in line with VS Code (see #624 for the VS Code side).
Where
intellij-client/src/main/kotlin/dev/robotcode/robotcode4ij/execution/RobotCodeRunProfileState.kt,startProcess().The command is currently assembled as:
Only
-bl(by-longname) is added per selected item — no-N, no-I.Proposed
Mirror what the VS Code extension does in
DebugManager.runTests(
vscode-client/extension/debugmanager.ts):-N <topLevelSuiteName>— the discovered top-level suite name, so the-bllongnames computed at discovery time stay valid at run time (the runner'sByLongNamemodifier remaps them via--name).-I <relSource>per selected source file — but only when the project's Robot Framework supports--parseinclude(RF ≥ 6.1).Available building blocks
RobotCodeTestManager.supportsParseInclude(per-project flag) already exists — it was added alongside the [Bug] New version of RobotCode 2.6.* misses option -I in terminal command which causes errors #624 fix and is fed from the discovery result'ssupportsParseInclude.profile.includedTestItems: List<RobotCodeTestItem>carriesrelSourceandlongnamefor each selected item.project.testManger.testItems(theworkspaceitem's first child'slongname).escapeRobotGlob(...)should be used for-Ivalues (glob patterns), as in the discovery path.Complication to investigate
The IntelliJ command is structured differently from VS Code's: it has no
--separator and no-d results.-Nand-Iare Robot options, so their placement/ordering relative to robotcode's own options (-bl) matters — a--separator is very likely required so click does not mis-parse them. This needs to be worked out and verified.Verification
Not covered by automated tests. Needs manual verification in the JetBrains sandbox IDE (
./gradlew runIde) against a project that has a broken/incompatible.robotfile next to a valid one, on RF ≥ 6.1:-I <relpath>and-N <rootname>, and no parse errors from the unrelated file appear.-I(the option does not exist there).Context