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

Improve ergonomics of running tests #115

Open
tillrohrmann opened this issue May 30, 2023 · 1 comment
Open

Improve ergonomics of running tests #115

tillrohrmann opened this issue May 30, 2023 · 1 comment

Comments

@tillrohrmann
Copy link
Contributor

At the moment it is very difficult to run an individual test using gradle. One way is to provide a test filter via --tests '*FoobarTest*'. However, one needs to invoke the right testing task since one cannot run build with this flag. I think this is an artifact of having a few non-standard testing tasks registered.

When running a single testing task, then it seems that we always run all test tasks as well (I suspect that this is caused by the TestReport task).

What is also very hard is to run a test/testing task (other than the test task) repeatedly. What gradle does is to not run the task if it is up to date. For the test task, there is a cleanTest task which deletes the build/test-results/test directory. I suspect that this one is used to check whether the task is up to date or not. For our custom test tasks, we don't have such a clean task and therefore one always needs to clean in order to re-run the tests. An alternative could be to provide the --rerun flag.

@slinkydeveloper
Copy link
Collaborator

slinkydeveloper commented May 30, 2023

Perhaps we could give a try to the https://docs.gradle.org/7.4/userguide/jvm_test_suite_plugin.html? Could improve a bit how we group different test configurations

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