Sebastian Schuberth
04/24/2025, 1:29 PMSebastian Schuberth
04/24/2025, 2:40 PM๐ Thanks for using JUnit! Support its development at <https://junit.org/sponsoring>
16:39:29.054 [main] INFO org.ossreviewtoolkit.utils.ort.OrtProxySelector - Proxy selector was successfully installed.
โท
โโ Kotest โ
Test run finished after 35 ms
[ 1 containers found ]
[ 0 containers skipped ]
[ 1 containers started ]
[ 0 containers aborted ]
[ 1 containers successful ]
[ 0 containers failed ]
[ 0 tests found ]
[ 0 tests skipped ]
[ 0 tests started ]
[ 0 tests aborted ]
[ 0 tests successful ]
[ 0 tests failed ]
So Kotest is found as a container, but no tests. Do I need to adjust some test pattern matcher or so?Emil Kantis
04/24/2025, 2:52 PMSebastian Schuberth
04/24/2025, 2:53 PMKotest has its own console launcher, if that's an option?It would! My goal simple is to run the functional tests of my Kotlin application without Gradle, from a self-contained "ttest runner app".
Sebastian Schuberth
04/24/2025, 2:54 PMSebastian Schuberth
04/24/2025, 2:55 PMWhat selector are you using?None. I'm relying on defaults. But the actual problem seems to be now that the code of my funTest source set is not properly bundled. I thought I had solved that problem, but it seems to be back ๐
Emil Kantis
04/24/2025, 2:56 PMEmil Kantis
04/24/2025, 2:56 PMEmil Kantis
04/24/2025, 2:57 PMSebastian Schuberth
04/24/2025, 2:58 PMSebastian Schuberth
04/24/2025, 3:08 PMsam
04/24/2025, 3:21 PMSebastian Schuberth
04/24/2025, 3:23 PMabendt
04/24/2025, 8:25 PMplugins {
// we use the gradle application plugin to build an application
application
...
}
dependencies {
// all kotest dependencies go to implementation to ensure they get packaged in the application
implementation(platform(libs.junit.bom))
implementation(libs.bundles.kotest)
runtimeOnly(libs.bundles.slf4j)
implementation("org.junit.platform:junit-platform-console-standalone:1.8.2")
}
with this gradle config a jar containing the tests is created. We package this + the dependency jars into a docker image. In the docker script we execute this command to run the tests:
java $JAVA_PROPS \
--add-opens=java.base/sun.nio.fs=ALL-UNNAMED \
-cp /app/resources:/app/classes:/app/libs/* \
org.junit.platform.console.ConsoleLauncher \
--disable-banner \
--scan-class-path \
--fail-if-no-tests \
--include-classname='.*Test.*' \
--reports-dir reports
Hope this helpsSebastian Schuberth
04/24/2025, 9:08 PMkotest-framework-standalone
with the io.kotest.engine.launcher.MainKt
entry point.