How to force java test execution?

(Matt Hauck) #1

I notice that if all tests passed on the previous run (and barring any changes to the source code), the test task is considered “UP-TO-DATE” and the test code is not run, even when I run it with “test.single”.

This behavior is pretty neat, but it would also be nice to be able to force a re-run of the tests without the up to date checking. Especially in the case of “test.single”, I would prefer it re-run the test.

Any way to do this? Thanks.

(Peter Niederwieser) #2

You can use ‘–rerun-tasks’ on the command line or ‘test.outputs.upToDateWhen { false }’ in the build script.

(Matt Hauck) #3

Ah, nice. Thanks!