bbaldino
05/16/2022, 6:40 PMNo tests found for given includes
when trying to run a single kotest test inside a gradle project--I assume this must be something dumb I’m missing but after googling around a bit I still haven’t seen anything that addresses it. I do have
tasks.withType<Test>().configureEach {
useJUnitPlatform()
}
in build.gradle.ktsEric Ampire [MOD]
05/17/2022, 11:57 PMBrian Estrada
05/19/2022, 6:16 AMphldavies
05/23/2022, 2:30 PMcharleskorn
05/23/2022, 10:51 PMassertionMode
to Error
and tests that use coroutines? My test uses coroutines and makes assertions (and the test fails if the assertions fail), but I still get a Test … did not invoke any assertions
error.Davio
05/24/2022, 8:52 AMclass MyTest: SomeSpec({ ... })
But in e.g. vanilla JUnit classes are always recommended to be internal (package private) and I found out that this works as well:
internal class MyTest: SomeSpec({ ... })
Is there a reason test classes should be public or can/should they be internal?Eric Ampire [MOD]
05/24/2022, 10:59 AMRoy Åne Sylthe
05/24/2022, 2:51 PMConfigTest
is being run as part of my integration tests. I have no explicit test filter in gradle telling it to pick up *Config*
as part of the integration test task, so I'm at a complete loss as to why this is happening after updating Kotest.Jonathan Lennox
05/26/2022, 7:36 PMSergio Crespo Toubes
05/27/2022, 11:17 AMval item = turbineState.awaitItem()
item.showProgress.shouldBe(false)
item.selectedItem.shouldBe(-1)
item.filteredLocations.count().shouldBe(2)
I tried this code but is not working...
turbineState.awaitItem().should {
!it.showProgress &&
it.selectedItem == -1 &&
it.filteredLocations.count() == 2
}
Emil Kantis
05/31/2022, 7:21 AMTestListener
?wasyl
06/03/2022, 1:52 PMsam
06/03/2022, 4:16 PMRob Elliot
06/06/2022, 5:44 PMTestListener
so that if TestResult.isErrorOrFailure
I can use RemoteWebDriver.getScreenshotAs
to capture the output.
However, I need to save the file somewhere... is there a way to work out an output directory for kotest? I guess it would be very dependent on how kotest was bring run (gradle, maven, stadalone, whatever), so probably not, but thought I'd ask if anyone had any bright ideas.Rob Elliot
06/06/2022, 6:33 PMAlexandre Brown
06/07/2022, 1:16 PMrunTest
still needed when using Kotest with testCoroutineDispatcher = true
?
Context : I would usually have a class with coroutineScope: CoroutineScope
in the constructor
class MyClass(private val coroutineScope: CoroutineScope): CoroutineScope by coroutineScope { }
then in my test I would do something like this :
"myTest using string spec" {
runTest {
val myClass = MyClass(this)
}
}
So that it uses the Coroutine scope from runTest
.
I see that StringSpec
has a test scope so that I can do the same but without wrapping my test with runTest
, is it safe to do so? I want to ensure the are no coroutines leaks between test to avoid flaky tests.
"myTest using string spec" {
val myClass = MyClass(this)
}
James Eschner
06/09/2022, 4:00 PM1.7.0
and am seeing this in Kotest:
Found interface kotlin.time.TimeMark, but class was expected
java.lang.IncompatibleClassChangeError: Found interface kotlin.time.TimeMark, but class was expected
at io.kotest.engine.spec.interceptor.SpecFinishedInterceptor.intercept-0E7RQCE(SpecFinishedInterceptor.kt:37)
at io.kotest.engine.spec.interceptor.SpecFinishedInterceptor$intercept$1.invokeSuspend(SpecFinishedInterceptor.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
do I need to wait for a new Kotest version?
** Not a contributionViktor Orlyk
06/11/2022, 5:06 PMM S
06/12/2022, 9:41 AMIdo Flax
06/15/2022, 1:35 PMSimonT
06/17/2022, 9:00 AMMatthew Wright
06/17/2022, 3:56 PMAnnotationSpec
but it doesn't appear kotest supports ParameterResolver
(Junit docs). Am I understanding this correctly?abendt
06/20/2022, 3:30 PMfun <K, V> Map<K,V>.shouldMatchAll(vararg matcher: Pair<K, (V) -> Unit>)
Do you think this is generally helpful and would you accept a PR with that matcher?wasyl
06/22/2022, 2:23 PMiamsteveholmes
06/22/2022, 9:53 PMIvan Pavlov
06/22/2022, 10:01 PMIllegalStateException: IN TEST
. The same test in jvm works as expected failing with IllegalStateException: IN BEFORE SPEC
class SimpleTest : FunSpec({
beforeSpec {
error("IN BEFORE SPEC")
}
test("test") {
error("IN TEST")
}
})
Didier Villevalois
06/26/2022, 1:38 PMdescribe
levels not supporting async lambdas in JS test frameworks. Now I need to understand why we need to have non-test-case levels suspending on the Kotest side?Richard Gomez
06/29/2022, 5:46 PMkotlinx-coroutines-bom:jar
, which obviously wouldn't exist (pom only).
Could not find artifact org.jetbrains.kotlinx:kotlinx-coroutines-bom:jar:1.6.3
This probably isn't an error with Kotest, but it's the closest lead I have right now.reactormonk
07/06/2022, 9:41 AMthe target size requirement of 63 could not be satisfied after 630 consecutive samples
This is the type I'm generating, both fields are enum classes:
data class PollingSettings(val polling: EnumSet<AutomaticPPICPolling>, val interval: PICCPollInterval)
Reducing the number of iterations didn't helpKlitos Kyriacou
07/06/2022, 3:26 PMextracting
feature? For example, in AssertJ I can do this:
assertThat(foo)
.extracting(Foo::id, Foo::description)
.containsExactly(1234, "this is a foo")
The closest I could find was shouldBeEqualUsingFields
but that's not suitable, as it requires another Foo argument which I can't easily construct; I only have the naked property values.