R: Modernize the session test architecture
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- r, typescript
- Domain
- devtools, testing-qa
Research direction
Start by locating the bundled tinytest suite and the session E2E tests that use Terminal.sendText() with fixed sleeps. Compare their startup path with R_PROFILE_USER and inspect how transport tests model Unix sockets and Windows named pipes. Done means incremental tests are separated by layer, synchronize deterministically, and identify the failing layer.
Written by the indexing model from the issue text.
Description
Background
While working on #1739, several weaknesses in the current R/session tests became apparent.
For example:
- the bundled
tinytestsuite was not run in CI; - some existing tests had already become stale;
- session E2E tests rely heavily on
Terminal.sendText()plus fixed sleeps/timeouts; - failures in R evaluation, callbacks, IPC, and VS Code handling often all appear as the same timeout;
- tinytests do not reproduce vscode-R's actual R startup path through
R_PROFILE_USER; - some transport tests use pipe primitives that do not exactly match production Unix sockets / Windows named pipes.
Proposal
Modernize the tests incrementally, roughly separating them into:
- R-level tests — runtime lifecycle, hooks, options, Data Viewer state, cleanup.
- sess transport tests — real socket/named-pipe request/response, disconnect and reconnect behavior.
- interactive R E2E — launch a real R session and deterministically observe startup, command completion, task callbacks, and prompt return.
- VS Code E2E — keep a smaller set of tests for terminal creation, workspace updates, plots,
View(), etc.
In particular, we should reduce sendText() + sleep + waitFor() style synchronization and make failures identify which layer actually failed.
This does not need to be a large rewrite. The goal is to improve the suite incrementally so it is more deterministic, closer to real usage, and easier to debug and extend.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 139
- Avg merge
- 10h 1m
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from REditorSupport/vscode-R
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
REditorSupport/vscode-R#1687 · 4 comments · 3 reactions ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 70/100
REditorSupport/vscode-R#1659 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
REditorSupport/vscode-R#1641 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
REditorSupport/vscode-R#1732 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
REditorSupport/vscode-R#1727 · 23 comments ·
All issues in REditorSupport/vscode-R
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·