posit-dev / posit-dev/positron

R: Test explorer does not register tests run a in a loop

Open
#9,632 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: core enhancement lang: r support
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 9h
Merged PRs (30d)
195

Description

testthat tests written in a loop do not appear to be captured by the test explorer. I'm not sure if this is the same issues as #7213.

I have a testing file that loops through running several variations of the same set of tests (here: https://github.com/redoc-dev/redoc/blob/roundtrip-testing/tests/testthat/test-roundtrip.R#L12-L35). They run fine in the console, terminal, or the RStudio testing pane. When running via Positron test explorer, none of these tests are picked up. It does appear to be running them, as it takes a similar amount of time. But in "Test Results" I get the message * The test run did not record any output., and while the test file shows in the testing pane, no tests appear below it:

Image

System details:

Session details:

Positron Version: 2025.09.0 build 139
Code - OSS Version: 1.103.0
Commit: 30e3d0a74e09a0f6640929822cb57a326671360e
Date: 2025-08-29T18:31:36.739Z
Electron: 37.2.3
Chromium: 138.0.7204.100
Node.js: 22.17.0
V8: 13.8.500258-electron.0
OS: Darwin arm64 25.0.0

Were there any error messages in the UI, Output panel, or Developer Tools console?

I think not

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the linked tests/testthat/test-roundtrip.R example, especially lines 12-35, and observe the Positron test explorer and Test Results output. Trace how the looped tests are discovered or recorded; done means the individual tests appear under the file and their results are recorded.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.