christophsturm
12/12/2020, 12:22 PMJavier
12/12/2020, 12:29 PMsam
12/12/2020, 2:52 PMchristophsturm
12/12/2020, 3:23 PMsam
12/12/2020, 3:25 PMchristophsturm
12/12/2020, 3:49 PMobject IsolationTest : FunSpec(
{
isolationMode = IsolationMode.InstancePerTest
context("ctx") {
val uuid = UUID.randomUUID().toString()
test("1") {
println("uuid$uuid")
}
test("2") {
println("uuid$uuid")
}
}
}
)
I created a new project with just this test and neither the gradle plugin nor the idea plugin finds it. if i change it to class it workssam
12/12/2020, 3:53 PMchristophsturm
12/12/2020, 3:53 PMsam
12/12/2020, 3:53 PMchristophsturm
12/12/2020, 3:54 PMsam
12/12/2020, 3:55 PMchristophsturm
12/12/2020, 3:55 PMsam
12/12/2020, 3:56 PMchristophsturm
12/12/2020, 3:57 PMsam
12/12/2020, 3:58 PMchristophsturm
12/12/2020, 3:58 PMsam
12/12/2020, 3:58 PMchristophsturm
12/12/2020, 4:00 PMsam
12/12/2020, 4:02 PMchristophsturm
12/12/2020, 4:03 PMsam
12/12/2020, 4:03 PMchristophsturm
12/12/2020, 4:04 PMsam
12/12/2020, 4:08 PMtest("foo") { }
val mytest = test("foo") { }
though, but then you need to name the val and the test.val mytest = test { }
val factory = funSpec {
test("here) { }
}
val myTestWithLongNameTestingThings = ...
or you have to back tick the names.christophsturm
12/12/2020, 4:14 PMsam
12/12/2020, 4:14 PMfun main() { }
isn't much time saving over class Foo : FunSpec() { }
christophsturm
12/12/2020, 4:16 PMsam
12/12/2020, 4:17 PMchristophsturm
12/12/2020, 4:18 PMsam
12/12/2020, 4:18 PMchristophsturm
12/12/2020, 4:21 PMoverride fun beforeAll() {
val uptime = ManagementFactory.getRuntimeMXBean().uptime;
println("beforeAll started after: $uptime")
sam
12/12/2020, 4:22 PMchristophsturm
12/12/2020, 4:25 PM> Task :kotest
OpenJDK 64-Bit Server VM warning: Option AllowRedefinitionToAddDeleteMethods was deprecated in version 13.0 and will likely be removed in a future release.
Starting test discovery scan...
Test discovery completed in 1135ms
After filters there are 13 spec classes
After discovery extensions there are 13 spec classes
Discovery is returning 13 specs
~~~ Kotest Configuration ~~~
-> Parallelization factor: 12
-> Default test timeout: 600000ms
-> Default test order: Sequential
-> Default isolation mode: InstancePerTest
-> Global soft assertations: False
-> Write spec failure file: False
-> Fail on ignored tests: False
-> Spec execution order: SpecExecutionOrder
-> Extensions
- io.kotest.engine.extensions.SystemPropertyTagExtension
- io.kotest.core.extensions.RuntimeTagExtension
- io.kotest.engine.extensions.RuntimeTagExpressionExtension
- io.kotest.engine.extensions.SpecifiedTagsTagExtension
-> Listeners
- class io.kotest.engine.config.LoadConfigFromClasspathKt$toDetectedConfig$beforeAfterAllListener$1
>> Kotest
- Mama always said testing was like a box of chocolates. You don't know which ones are gonna fail
- Test plan has 13 specs
invokeBeforeProject
beforeAll startet after: 2525
sam
12/12/2020, 4:27 PMchristophsturm
12/12/2020, 4:28 PMsam
12/12/2020, 4:28 PMchristophsturm
12/12/2020, 4:29 PMsam
12/12/2020, 4:29 PMchristophsturm
12/12/2020, 4:30 PMsam
12/12/2020, 4:31 PMchristophsturm
12/12/2020, 4:32 PMsam
12/12/2020, 4:33 PMchristophsturm
12/12/2020, 4:34 PMincludeBuild("../kotest")
in settings.gradle.ktssam
12/12/2020, 4:34 PMchristophsturm
12/12/2020, 4:35 PMsam
12/12/2020, 4:35 PMio.kotest.engine.launcher.MainKt
and
io.kotest.engine.reporter.TaycanConsoleReporter
on your classpath, and then the usual kotest stuff like framework. So it should work.