Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test status not updating #21

Open
jancrichter opened this issue Oct 19, 2022 · 1 comment
Open

Test status not updating #21

jancrichter opened this issue Oct 19, 2022 · 1 comment

Comments

@jancrichter
Copy link

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.

  • 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

@meakbiyik
Copy link
Owner

@jancrichter I need a bit more info, as ideally this should not be an issue.

  1. Can you run all the tests for the whole file successfully via the panel? Or is the issue just with running single tests?
  2. Can you run a very simple test (e.g., just asserting 1 == 1 in a file without any other content) similarly via the panel?
  3. Can you run the test outside the container via the panel?
  4. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants