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
I am currently setting up a development container for my team via VSCodes devcontainer.json and docker compose. I would like to use the R Test Explorer in there, but so far it is not working correctly.
Unit tests are recognized and listed correctly.
When I run them manually they work fine.
When I try to run them either via the green play icon in the editor or via the Test explorer panel, it show to be working, and takes an expected amount of time to compelte, but then just returns to the grey icon (Not yet run).
The top of the test explorer always says "0/0 tests passed"
The test output states > Test run finished at 10/19/2022, 10:53:23 AM <
The log just shows this:
[2022-10-19 08:53:19.301] [INFO] Creating a file node for file:///<redacted>/reliability/tests/testthat/test_add.R
[2022-10-19 08:53:20.669] [INFO] Test run started.
[2022-10-19 08:53:20.669] [INFO] Tests are enqueued.
[2022-10-19 08:53:20.669] [INFO] Running test with label test
[2022-10-19 08:53:20.669] [INFO] Test type is test case and a single test
[2022-10-19 08:53:20.672] [INFO] Started running single test file in path <redacted>/reliability/tests/testthat/test-c0085f38-8b1d-41c2-9de6-63b2792d2554.R
[2022-10-19 08:53:20.673] [INFO] Using Rscript in the configuration: /usr/bin/Rscript
[2022-10-19 08:53:21.313] [INFO] devtools version: 2.4.3
[2022-10-19 08:53:21.314] [INFO] Running test file in path <redacted>/reliability/tests/testthat/test-c0085f38-8b1d-41c2-9de6-63b2792d2554.R in working directory <redacted>/reliability
[2022-10-19 08:53:23.726] [DEBUG] Test output: ℹ Loading vscodereporter
devtools is 2.4.3
testthat is 3.1.1
R is 4.0.5
My best guess right now is that it might be caused by permissions due to my running it in a container, would it try to create any files in a parent folder or some such?
Best regards,
Jan
The text was updated successfully, but these errors were encountered:
@jancrichter I need a bit more info, as ideally this should not be an issue.
Can you run all the tests for the whole file successfully via the panel? Or is the issue just with running single tests?
Can you run a very simple test (e.g., just asserting 1 == 1 in a file without any other content) similarly via the panel?
Can you run the test outside the container via the panel?
Do all the test fail to run, or just some of them?
Overall, my expectation is that running a single test might be the issue here particularly if the test has external dependencies. Right now, I hack around to make this work by creating a new file with all other test functions removed and run it, but naturally this might not work for very complex instances.
Hi there,
I am currently setting up a development container for my team via VSCodes devcontainer.json and docker compose. I would like to use the R Test Explorer in there, but so far it is not working correctly.
devtools is 2.4.3
testthat is 3.1.1
R is 4.0.5
My best guess right now is that it might be caused by permissions due to my running it in a container, would it try to create any files in a parent folder or some such?
Best regards,
Jan
The text was updated successfully, but these errors were encountered: