https://kotlinlang.org logo
#kotest
Title
# kotest
s

Sebastian Schuberth

03/29/2023, 10:12 AM
Is there a way in Kotest to show which tests / specs of a given tag would be run (i.e. the code under test was changed) without actually running the tests yet? I was hoping that something like
./gradlew funTest -Dkotest.tags=Docker --dry-run
would give a clue, but that just shows all tasks as skipped.
s

sam

03/29/2023, 11:02 AM
I wasn't aware of the dry-run tag on gradle
It must pass that flag to the tests somehow and so kotest would have to honour it
e

Emil Kantis

03/29/2023, 11:40 AM
Does this work with Junit?
c

christophsturm

03/29/2023, 12:44 PM
isnt the dry run flag just for gradle tasks?
there is no way kotest (or failgood) can support that because the tasks do not run at all
s

sam

03/29/2023, 12:58 PM
Ahh I see. So @Sebastian Schuberth wants the task to interpret it show the tests that would run. But if gradle isn't invoking the task, there's nothing we can do.
c

christophsturm

03/29/2023, 12:59 PM
right. it would need to be a different option one that is not handled by gradle and passed to kotest
or maybe an env var
DRY_RUN=true ./gradlew test
e

Emil Kantis

03/29/2023, 1:01 PM
With a more fleshed out gradle plugin, we could generate a dry-run task for Kotest
s

Sebastian Schuberth

03/29/2023, 1:18 PM
@sam is right, sorry for any confusion my example might have caused.
6 Views