Disable test cache when running through gradle
Asked Answered
J

3

9

When I tried to run the same test once again:

$ ./gradlew -Dtest.single=KafkaStreamsTest streams:test

> Configure project :
Building project 'core' with Scala version 2.11.11


BUILD SUCCESSFUL in 1s

How do I disable the cache so that gradlew runs the whole test ?

Thanks

Jujube answered 1/9, 2017 at 0:25 Comment(2)
--rerun-tasks perhaps?Barbellate
See the correct answer https://mcmap.net/q/126087/-how-to-run-gradle-test-when-all-tests-are-up-to-dateSeurat
J
9

This command would run the test (note cleanTest):

./gradlew cleanTest -Dtest.single=KafkaStreamsTest streams:test
Jujube answered 1/9, 2017 at 13:55 Comment(0)
F
6

In Gradle 7.6 you can use option

gradle test --rerun

--rerun causes the task to be re-run even if up-to-date. Similar to --rerun-tasks, but only for a specific task.

Forman answered 2/2, 2023 at 15:39 Comment(0)
S
4

and for reference if you would like to run tests without skipping due to cache

gradle clean build --no-build-cache
Sarena answered 10/2, 2023 at 15:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.