kotest / kotest-gradle-plugin

A gradle plugin for Kotest
https://kotest.io
Apache License 2.0
29 stars 5 forks source link

Reporting and Console issues on Kotest 5.3.0 #38

Closed rezammalik closed 1 year ago

rezammalik commented 2 years ago

Not sure if these are inter-related issues but I am using plugin version 0.3.8 with Kotest 5.3.0 and get the following error when the kotest engine starts, the tests still execute after this.

io.kotest.engine.reporter.TaycanConsoleReporter
java.lang.ClassNotFoundException: io.kotest.engine.reporter.TaycanConsoleReporter
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:315)
        at io.kotest.engine.launcher.ConsoleKt.createConsoleListener(console.kt:21)
        at io.kotest.engine.launcher.MainKt.main(main.kt:30)

Also noticing the jUnitXml reporter config using the new Extensions method instead of Listener not working properly like it used to with 4.6.4.

Before with full paths appearing with the JunitXML config in project config for Kotest in 4.6.4 and Gradle Plugin 0.3.8 (Using old Listener style)

<?xml version="1.0" encoding="UTF-8"?>
<testsuite timestamp="2022-06-29T15:09:21" time="20" hostname="xxx" errors="0" failures="0" skipped="0" tests="2" name="Test 1">
  <testcase name="Account created via createAccount for a63fdad5-926a-47f9-8c68-97a77d9ee5df on Internal Endpoint returns the correct response and passes data validation" classname="Test 1" time="0" />
  <testcase name="Account created via createAccount for a63fdad5-926a-47f9-8c68-97a77d9ee5df on Gateway Endpoint returns the correct response and passes data validation" classname="Test 1" time="0" />
</testsuite>

After with only the last test appearing without any intermediary tests in path, with the JunitXML config in project config for Kotest in 5.3.0 and Gradle Plugin 0.3.8 (Using the new Extensions style)

<?xml version="1.0" encoding="UTF-8"?>
<testsuite timestamp="2022-06-29T15:18:24" time="22.922" hostname="xxx" errors="0" failures="0" skipped="0" tests="2" name="Test 1>
  <testcase name="on Internal Endpoint -- returns the correct response and passes data validation" classname="Test 1" time="0.285" />
  <testcase name="on Gateway Endpoint -- returns the correct response and passes data validation" classname="Test 1" time="0.303" />
</testsuite>

Also noticing the "OK" keyword next to my passing tests in the console is not ASCII color coded green anymore on 5.3.0.

Any help is appreciated figuring out what is going on.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

rezammalik commented 1 year ago

Any updates on this. Hopfully it doesn't get closed automatically

rezammalik commented 1 year ago

Any updates on this? I updated to Kotest 5.54 and gradle plugin version 0.3.9 and I still see the TaycanConsoleReporter error and no console colors.

rezammalik commented 1 year ago

@sksamuel any chance of the plugin being updated to work on v.5 of the kotest library? I would love to continue using it but want to make sure it is still being supported.

rezammalik commented 1 year ago

I assume this line needs to change to the EnhancedConsoleListener along with an update to 5.5.5 for Kotest from 4.6.4?

https://github.com/kotest/kotest-gradle-plugin/blob/2301c432a3b320c8683fe28972aa68c57f31ce66/src/main/kotlin/io/kotest/gradle/Kotest.kt#L37

rezammalik commented 1 year ago

@sksamuel Hey Sam. I made the update locally to the plugin and it is working with the Enhanced Test Listener. I'd like to submit a PR but don't have permissions. Can I get these or let you know the changes I made so we can get these in? Would love to continue using this plugin.

sksamuel commented 1 year ago

I see your PR now.

rezammalik commented 1 year ago

Thanks Emil and Sam.