trying to use test filters results in all tests be...
# kotest
s
trying to use test filters results in all tests being executed, regardless of the filter.
build.gradle.kts.kt
gradle clean test -Dkotest.filter.specs='*PrintDrlTest*' --scan --info.kt
hm. no clue what’s going on here. I’ve tried a lot of stuff. I thought maybe it was the kotest version, so I updated it, I thought maybe it was because my test didn’t actually have any sort of assertions in it so I added assertions, I’ve tried with both the regular
--tests
filter and with the specific
-Dkotest.filter.specs
option.
hm. wait. something even weirder is happening. If I use
--tests
then it actually does run only a single test, but then it fails, because it thinks no tests were found (even though the test did run…)
Copy code
com.sunrun.pricing.flex.PrintDrlTest > print each workbook STANDARD_OUT
    AAAAAHHHHHHH

com.sunrun.pricing.flex.PrintDrlTest > print each workbook > Commissions > Monthly STANDARD_ERROR
    ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...

Gradle Test Executor 26 finished executing tests.

> Task :lambda:test FAILED
Finished generating test XML results (0.002 secs) into: /Users/tylerthrailkill/Documents/dev/work/flex-pricing/lambda/build/test-results/test
Generating HTML test report...
Finished generating test html results (0.002 secs) into: /Users/tylerthrailkill/Documents/dev/work/flex-pricing/lambda/build/reports/tests/test

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':lambda:test'.
> No tests found for given includes: [*PrintDrlTest*](--tests filter)
sorry, keep forgetting to provide other information. I’m running in terminal, not intellij.
s
--tests works but you have to follow gradles format (doesn't work on nested tests)
if you use -D then you need to make sure the args are passed to the forked process, you can't just put the on the command line