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

Allow dynamic setting of running tests in parallel #2035

Open
jakubsob opened this issue Nov 28, 2024 · 0 comments
Open

Allow dynamic setting of running tests in parallel #2035

jakubsob opened this issue Nov 28, 2024 · 0 comments

Comments

@jakubsob
Copy link

jakubsob commented Nov 28, 2024

It'd be useful to allow running tests in parallel based on options which can be changed during R session instead of the DESCRIPTION.

  • It could allow running tests in parallel locally, when we might care more about getting results faster and to run them sequentially in CI (or the other way around).
  • When parallel testing is set, even when a single test file is run, e.g. with filter parameter of test_dir, a new session is spun up, leading to slower feedback from tests. It could be made easier to switch between running in parallel or sequentially.
  • It would allow running tests in parallel in non-package projects.

I believe such change could be implemented by just removing the reading of DESCRIPTION file in find_parallel() and relying only on the TESTTHAT_PARALLEL variable. Then we'd have the option to switch it on and off on demand during session. It would be consistent with the ability to set number of workers with TESTTHAT_CPUS variable.

@jakubsob jakubsob changed the title Dynamically allow running tests in parallel Allow dynamic setting of running tests in parallel Nov 28, 2024
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

1 participant