Shervin
04/21/2023, 11:03 AMio.kotest.assertions.AssertionFailedError at MyTest.kt:112
without any extra information about what was the reason.
the test that is failing has only one assertion:
Line 112 as mentioned in error:
response shouldBe "ok"
1. why this assertion doesn't have more informative output?
2. how can I have a better output?
Any idea ?mitch
04/21/2023, 11:58 AMwithClue
? that can be extremely helpful in these circumstances. https://kotest.io/docs/assertions/clues.htmlmitch
04/21/2023, 12:02 PMShervin
04/21/2023, 12:03 PMShervin
04/21/2023, 12:08 PMresponse.asClue {
it.title shouldBe "ok"
}
mitch
04/21/2023, 12:10 PMmitch
04/21/2023, 12:10 PMmitch
04/21/2023, 12:12 PMtasks {
withType<Test> {
useJUnitPlatform()
testLogging {
setExceptionFormat("full")
setEvents(listOf("passed", "skipped", "failed", "standardOut", "standardError"))
}
}
}
mitch
04/21/2023, 12:15 PMShervin
04/21/2023, 12:17 PMuseJUnitPlatform()
when I'm using only
io.quarkus:quarkus-junit5
for test runner ?Shervin
04/21/2023, 12:17 PM5.5.4
mitch
04/21/2023, 12:20 PMShervin
04/21/2023, 12:24 PMShervin
04/21/2023, 12:30 PMquarkus.log.category.io.quarkus.test=TRACE
Shervin
04/21/2023, 12:30 PMmitch
04/21/2023, 1:06 PMEmil Kantis
04/21/2023, 1:33 PMuseJUnitPlatform()
. It tells Gradle that you're using JUnit as a testing platform and will pick up test results from there.. Kotest integrates with JUnit to provide test results, but Gradle needs to know that it should listen for itShervin
04/21/2023, 1:56 PMEmil Kantis
04/21/2023, 1:59 PMcom.adarshr.test-logger
to get prettier console output from Gradle testsEmil Kantis
04/21/2023, 1:59 PMShervin
04/21/2023, 2:00 PM