kotest / kotest-intellij-plugin

The official Kotest plugin for Intellij and Android Studio
Apache License 2.0
173 stars 19 forks source link

Support kotest 4.0.0 #42

Closed netvl closed 4 years ago

netvl commented 4 years ago

Currently this plugin does not know about io.kotest classes, making it unusable with the latest 4.0.0-BETA1 release - you can't run individual tests, for example, and have to use native JUnit 5 test facilities which don't work well with kotest.

sksamuel commented 4 years ago

Yes, there is work to upgrade this before 4.0 final.

On Wed, 19 Feb 2020 at 13:14, Vladimir Matveev notifications@github.com wrote:

Currently this plugin does not know about io.kotest classes, making it unusable with the latest 4.0.0-BETA1 release - you can't run individual tests, for example, and have to use native JUnit 5 test facilities which don't work well with kotest.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/42?email_source=notifications&email_token=AAFVSGXLMZPMVPUVDL437ODRDWAILA5CNFSM4KX74JEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IOXWJBA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGQOBODD36AE4BBXRM3RDWAILANCNFSM4KX74JEA .

rackdon commented 4 years ago

Any update about the state of this task?

sksamuel commented 4 years ago

Do you want to try the beta ?

qoomon commented 4 years ago

Sure

sksamuel commented 4 years ago

kotest-plugin-intellij-0.90.14.zip

Latest build attached. You need to install this in intellij plugins manually. Click the gear icon when you're in the plugins screen.

I've added docs on the features of the plugin to the main readme here: https://github.com/kotest/kotest-intellij-plugin

sksamuel commented 4 years ago

image

sksamuel commented 4 years ago

Any feedback?

rackdon commented 4 years ago

Until the moment, everything works well. If I encounter any problem I'll write that here. Thank you very much for the beta

qoomon commented 4 years ago

Same here, works as expected. Great job.

sksamuel commented 4 years ago

I'm surprised it's been that simple :)

On Tue, 21 Apr 2020 at 01:06, Bengt Brodersen notifications@github.com wrote:

Same here, works as expected. Great job.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/42#issuecomment-616972264, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGQCCLIT6S7WDHJMA6LRNUZWNANCNFSM4KX74JEA .

nlochschmidt commented 4 years ago

I tried this as well, with IntelliJ 2020.1, kotest 4.0.3 in the project and kotest-runner-console-jvm:4.1.0.251-SNAPSHOT as described in the README. Worked perfectly for the last couple of hours 👍

Edit: Anyone reading this later, don't mix the versions like I did. Use the snapshot versions for libs and runner and keep them in the same exact version.

sksamuel commented 4 years ago

Great.

On Fri, 24 Apr 2020 at 06:44, Niklas Lochschmidt notifications@github.com wrote:

I tried this as well, with kotest 4.0.3 in the project and kotest-runner-console-jvm:4.1.0.251-SNAPSHOT as described in the README. Worked perfectly for the last couple of hours 👍

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/42#issuecomment-618962222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGTEZGENFO2YRNJKQPTROF3SLANCNFSM4KX74JEA .

rackdon commented 4 years ago

It fails with the last Kotest version 4.0.4 and kotest-runner-console-jvm:4.1.0.259-SNAPSHOT. Doesn't compile the tests correctly to run it inside Intellij

sksamuel commented 4 years ago

Please use 4.1.0.259-SNAPSHOT for everything. 4.0.4 introduces some internal changes so that's probably why.

On Fri, 24 Apr 2020 at 09:33, Ricardo Martínez notifications@github.com wrote:

It fails with the last Kotest version 4.0.4 and kotest-runner-console-jvm:4.1.0.259-SNAPSHOT. Doesn't compile the tests correctly to run it inside Intellij

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/42#issuecomment-619047532, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGXJIZE2VRYRC5VXSGDROGPKTANCNFSM4KX74JEA .

rackdon commented 4 years ago

Tested with 4.0.5 and 4.1.0.268-SNAPSHOT -> Everything works but takes a lot of time to compile the tests again and appear the run/debugg button in the left side

sksamuel commented 4 years ago

Forget the 4.0.x deps, as they're not meant to be used with the plugin. Use only the latest snapshot.

Can you give me more details / screenshot on what you mean by "appear the run/debugg button in the left side"

rackdon commented 4 years ago

Without buttons

image-without-buttons

with buttons

image-with-buttons
sksamuel commented 4 years ago

@rackdon can you try with all your dependencies set to the latest snapshot rather than just the console runner? Also what spec type are you using here.

rackdon commented 4 years ago

My previous comment was with both possibilities, only the console runner as latest or all the dependencies as latest and the result is the same in both cases. On the other hand, I use StringSpec

sksamuel commented 4 years ago

There are tests for gutter icons that are passing on string spec. And it works for me if I try. You're on 0.90.16 ?

On Mon, 27 Apr 2020 at 23:58, Ricardo Martínez notifications@github.com wrote:

My previous comment was with both possibilities, only the console runner as latest or all the dependencies as latest and the result is the same in both cases. On the other hand, I use StringSpec

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/42#issuecomment-620381071, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGXL3JTE7VKNPMF6XZLROZPBBANCNFSM4KX74JEA .

rackdon commented 4 years ago

Icons appear, the problem is that takes a lot of time to happen (in comparison with kotest-runner-console-jvm:4.1.0.251-SNAPSHOT). If you refer to Kotest-plugin version with 0.90.16, not, I'm on 0.90.14 (the version which you shared with us in this issue). There is no versions of the plugin in the marketplace so I can't update it

sksamuel commented 4 years ago

kotest-plugin-intellij-0.90.17.zip

Can you try this version and also make sure you're on the kotest snapshot for all kotest deps.

Thanks.

rackdon commented 4 years ago

I have the same problem

Captura de pantalla 2020-04-28 a las 16 36 46

def kotest_version = "4.0.5" My deps are testImplementation 'io.kotest:kotest-runner-console-jvm:4.1.0.269-SNAPSHOT' testImplementation "io.kotest:kotest-extensions-spring-jvm:$kotest_version" testImplementation "io.kotest:kotest-assertions-arrow-jvm:$kotest_version" testImplementation "io.kotest:kotest-runner-junit5-jvm:$kotest_version" testImplementation "io.kotest:kotest-assertions-core-jvm:$kotest_version" testImplementation "io.kotest:kotest-property-jvm:$kotest_version"

sksamuel commented 4 years ago

You're not using the same version for all kotest dependencies. I don't know if that would help but 4.0.5 shouldn't be mixed with a snapshot.

On Tue, 28 Apr 2020 at 09:38, Ricardo Martínez notifications@github.com wrote:

I have the same problem [image: Captura de pantalla 2020-04-28 a las 16 36 46] https://user-images.githubusercontent.com/9605759/80500441-83458280-896e-11ea-8cd9-87031d86499b.png

def kotest_version = "4.0.5" My deps are testImplementation 'io.kotest:kotest-runner-console-jvm:4.1.0.269-SNAPSHOT' testImplementation "io.kotest:kotest-extensions-spring-jvm:$kotest_version" testImplementation "io.kotest:kotest-assertions-arrow-jvm:$kotest_version" testImplementation "io.kotest:kotest-runner-junit5-jvm:$kotest_version" testImplementation "io.kotest:kotest-assertions-core-jvm:$kotest_version" testImplementation "io.kotest:kotest-property-jvm:$kotest_version"

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/42#issuecomment-620648604, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGXDL2Y3O2V7J3QSMWTRO3S7DANCNFSM4KX74JEA .

rackdon commented 4 years ago

the only one that is different is kotest-runner-console-jvm. I thought that library was independent from the other

sksamuel commented 4 years ago

They're all kind of dependent

On Tue, 28 Apr 2020, 10:44 Ricardo Martínez, notifications@github.com wrote:

the only one that is different is kotest-runner-console-jvm. I thought that library was independent from the other

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/42#issuecomment-620687753, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGW53FOJWWX7AFH3FJTRO32WNANCNFSM4KX74JEA .

rackdon commented 4 years ago

As I can't use Kotest snapshot libraries (excepting kotest-runner-console-jvm) in the work, what I've done is establish all the libraries (including kotest-runner-console-jvm) to 4.0.5 version and everything works perfectly. I don't have compilation delays in the tests (as I had before) and all the buttons appears. The only difference is that now also appears the option to run the tests through JUnit (as you can see in the following snapshot), but doesn't matter in my case

Captura de pantalla 2020-04-29 a las 7 10 17
sksamuel commented 4 years ago

In 4.1.x that unit thing is gone FYI.

On Wed, 29 Apr 2020 at 00:12, Ricardo Martínez notifications@github.com wrote:

As I can't use Kotest snapshot libraries (excepting kotest-runner-console-jvm) in the work, what I've done is establish all the libraries (including kotest-runner-console-jvm) to 4.0.5 version and everything works perfectly. I don't have compilation delays in the tests (as I had before) and all the buttons appears. The only difference is that now also appears the option to run the tests through JUnit (as you can see in the following snapshot), but doesn't matter in my case [image: Captura de pantalla 2020-04-29 a las 7 10 17] https://user-images.githubusercontent.com/9605759/80562692-be849780-89e8-11ea-91a0-5a1b4fa4dd06.png

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/42#issuecomment-620991863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGS3IS35HTFBVENEI43RO6ZMBANCNFSM4KX74JEA .

sksamuel commented 4 years ago

Please use the 1.0.0 kotest plugin from the plugin store, alongside 4.1.0