https://kotlinlang.org logo
#announcements
Title
# announcements
j

Jakub

08/13/2019, 2:47 PM
*Unfortunately we have troubles with running all tests when they are mixed
junit
&
spek
. We would like to migrate from
Spek 2
framework to pure
junit4
in our project. In our case that’s a ton of tests. Have you seen any converter that does that?
c

Casey Brooks

08/13/2019, 3:09 PM
what kinds of problems are you having? I believe Spek runs as a Junit5 test engine, and there is a “vintage” engine to run Junit4 tests. Both of them should just work within the Junit5 framework
m

Mike

08/13/2019, 3:42 PM
I'd strongly suggest moving to JUnit5 API for your tests. It's much better than JUnit4, and yet quite similar overall.
👆 1
t

tapchicoma

08/13/2019, 3:48 PM
I am curious what are downsides of spek2 tests that you've decided to migrate to Junit4 style? 🤔
j

Jakub

08/15/2019, 9:21 AM
Thank you for your support. We fixed the issue thanks to https://github.com/spekframework/spek/issues/232
That’s not my decision about ditching
Spek
in our existing code base. However, personally, I wouldn’t choose it for a greenfield project, because I don’t like frameworks with uncertain future.
m

Mike

08/15/2019, 10:16 AM
I agree about future of Spek2. It looks promising, but has looked promising for at least 1 1/2 years now. Kotlintest or Junit5+AssertJ/Atrium are much better alternatives.
s

sam

08/16/2019, 1:17 AM
If you have many tests written in Spek style, it would probably be easier to convert them to KotlinTest style than back to
@test fun myTest() {}
👍 1
3 Views